1

I'm using ActiveScaffold with Ruby on Rails and I'm loving it, however there is one weird thing. Whenever I hit "Edit" or "Create New" in my webapp's ActiveScaffold, it says "Create {{model}}" or "Update {{model}}" in the webapp rather than using the model's name. Why is this? I have an ads_controller.rb that includes this:

active_scaffold :ad do |config|
  config.label = "Ads"
  config.columns = [:name, :description, :imageUrl, :linkUrl, :apps, :created_at,      :updated_at]
  config.update.columns = [:name, :description, :imageUrl, :linkUrl, :apps]
  config.create.columns = config.update.columns
  list.sorting = {:created_at => 'DESC'}
  columns[:imageUrl].label = "Image URL"
  columns[:linkUrl].label = "Link URL"
end

And my routes.rb includes this:

map.namespace :admin do |admin|
  admin.root :controller => 'admin_home', :action => 'index'
  admin.resources :ads, :active_scaffold => true
end

Any thoughts on why I'm seeing "Create {{model}}" instead of "Create ad" ?

2 Answers2

1

I just had this problem yesterday.

Looks like the correct syntax to perform interpolation on resources is using %{model} instead of {{model}}, despite some documentation claiming otherwise.

Check your resource files in config/locales.

Fábio Batista
  • 25,002
  • 3
  • 56
  • 68
1

If you have activescaffold installed as a plugin, you'll have to edit: vendor/plugins/active_scaffold/lib/active_scaffold/locale/en.yml and replace the {{model}}, etc with %{model}

jwilkins
  • 401
  • 5
  • 4