Wednesday, June 24th, 2009

undefined method `render_component’ with ActiveScaffold and Rails 2.3.2

Problem
When using a nested (or embedded) scaffold in ActiveScaffold with Rails 2.3.2 you have the error:
undefined method `render_component’
Solution
According to the issue here, in Rails 2.3 the render_component has been removed.
Install the render_component from:
script/plugin install git://github.com/lackac/render_component.git -r rails-edge
and restart your server, and it should be working.

1 Comment » - Posted in ActiveScaffold, linux, ruby on rails by kosmas

Thursday, February 19th, 2009

Using ActiveScaffold in Rails 2.2 after using default scaffolding

Problem
You want to use ActiveScaffold in Rails 2.2, in a model that you have created using the standard Rails scaffolding script.
Solution

Install the ActiveScaffold plugin:
script/plugin install git://github.com/activescaffold/active_scaffold.git -r rails-2.2

In your layout (model or application for all models) add the following:

In your controller file delete all the standard scaffolding code and add one line, so that your [...]

No Comments » - Posted in ruby on rails by kosmas

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 [...]

No Comments » - Posted in ruby on rails by admin