Friday, November 16th, 2007
Adding icons to ActiveScaffold’s actions
Problem
You want to replace the standard text descriptions in ActiveScaffold’s actions with your icons.
Solution
Create a file called active_scaffold_overrides.css in ror_project/public/stylesheets
Copy the css code from ror_project/vendor/plugins/active_scaffold/frontends/default/stylesheets/stylesheet.css and paste it in to the file created in the previous step.
Create a directory my_images in ror_project/public/images/activescaffold to hold your images.
Copy to the new directory the images you want to [...]
2 Comments » - Posted in ruby on rails by kosmas
Thursday, November 8th, 2007
Controller testing in Active Scaffold
Problem
You need to have to functionally test your controller when you are using ActiveScaffold. There are pieces of code that tell you how to do that on a normal ror application (ie without ActiveScaffold), like recipe 7.17 on the Rails Cookbook, or a fragment of code in an Active Scaffold application, but they don’t have [...]
2 Comments » - Posted in ruby on rails by kosmas
Friday, November 2nd, 2007
dhtmlcalendar in ActiveScaffold
To control the date format in dhtmlcalendar within ActiveScaffold in Ruby on Rails, to make the date of 2 November 2007 appear like 02-11-2007, use:
i) if you want to affect the settings in all the application add the following to the top of your controllers/application.rb
ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMAT[:default] = ‘%d-%m-%Y’
ii) If you only want to affect the [...]