I saw the previous thread about this, but I don't think the resolution
was ever clearly stated. Any help is appreciated.
Rails 2.3.5 (I'm forced to use this release by the project manager)
./script/plugin install git://
github.com/activescaffold/active_scaffold.git
-r rails-2.3
I have a model that has no associations. It's called ConfigItem. I
created a controller to display it and added the appropriate route.
When I display the index, it works fine until I create the first
record. Then it gives me the error whenever I try to display the one
record in AS. It seems to be something with date
internationalization.
If I change the controller to remove all the date_time columns, it
displays fine. Something about the display of the updated_at and
created_at columns causes this error to be thrown.
----- Error message spit out by dev version --------
I18n::MissingInterpolationArgument in Config_items#index
Showing vendor/plugins/active_scaffold/frontends/default/views/
_list_record.html.erb where line #12 raised:
missing interpolation argument in "%a, %{count} %b %Y %H:%M:%S
%z" ({:object=>Wed, 06 Oct 2010 17:42:07 UTC +00:00} given)
Extracted source (around line #12):
9: <tr class="record <%= tr_class %>" id="<%= element_row_id(:action
=> :list, :id =>
record.id) %>">
10: <% active_scaffold_config.list.columns.each do |column| %>
11: <% authorized = record.authorized_for?(:action
=> :read, :column =>
column.name) -%>
12: <% column_value = authorized ? get_column_value(record,
column) : active_scaffold_config.list.empty_field_text -%>
13:
14: <td class="<%= column_class(column, column_value) %>" >
15: <%= authorized ? render_list_column(column_value, column,
record) : column_value %>
Trace of template inclusion: vendor/plugins/active_scaffold/frontends/
default/views/_list.html.erb, vendor/plugins/active_scaffold/frontends/
default/views/list.html.erb
RAILS_ROOT: /Users/mvargo/projects/upgrade_server
Application Trace | Framework Trace | Full Trace
/Library/Ruby/Gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:186:in
`interpolate_without_deprecated_syntax'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/
i18n_interpolation_deprecation.rb:21:in `interpolate'
/Library/Ruby/Gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:49:in
`translate'
/Library/Ruby/Gems/1.8/gems/i18n-0.4.1/lib/i18n.rb:152:in `t'
/Library/Ruby/Gems/1.8/gems/i18n-0.4.1/lib/i18n/backend/base.rb:62:in
`localize'
/Library/Ruby/Gems/1.8/gems/i18n-0.4.1/lib/i18n.rb:231:in `localize'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/helpers/
translation_helper.rb:24:in `l'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable.rb:34:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable.rb:34:in `render_without_active_scaffold'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/base.rb:
306:in `with_template'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable.rb:30:in `render_without_active_scaffold'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable_partial.rb:20:in `render'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
benchmarking.rb:26:in `benchmark'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
benchmarking.rb:26:in `benchmark'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable_partial.rb:19:in `render'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
template.rb:205:in `render_template'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable_partial.rb:44:in `render_partial'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
partials.rb:221:in `render_partial_collection'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
partials.rb:216:in `map'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
partials.rb:216:in `render_partial_collection'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
partials.rb:182:in `render_partial'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/base.rb:
267:in `render_without_active_scaffold'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable.rb:34:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable.rb:34:in `render_without_active_scaffold'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/base.rb:
306:in `with_template'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable.rb:30:in `render_without_active_scaffold'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable_partial.rb:20:in `render'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
benchmarking.rb:26:in `benchmark'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
benchmarking.rb:26:in `benchmark'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable_partial.rb:19:in `render'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
template.rb:205:in `render_template'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable_partial.rb:44:in `render_partial'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
partials.rb:184:in `render_partial'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/base.rb:
267:in `render_without_active_scaffold'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable.rb:34:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable.rb:34:in `render_without_active_scaffold'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/base.rb:
306:in `with_template'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
renderable.rb:30:in `render_without_active_scaffold'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/
template.rb:205:in `render_template'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_view/base.rb:
265:in `render_without_active_scaffold'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
base.rb:1250:in `render_for_file'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
base.rb:951:in `render_without_benchmark'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
benchmarking.rb:51:in `render_without_active_scaffold'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
benchmarking.rb:51:in `render_without_active_scaffold'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
mime_responds.rb:135:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
mime_responds.rb:135:in `custom'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
mime_responds.rb:179:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
mime_responds.rb:179:in `respond'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
mime_responds.rb:173:in `each'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
mime_responds.rb:173:in `respond'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
mime_responds.rb:107:in `respond_to'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
base.rb:1331:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
base.rb:1331:in `perform_action_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
filters.rb:617:in `call_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
filters.rb:610:in `perform_action_without_benchmark'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
benchmarking.rb:68:in `perform_action_without_rescue'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
benchmarking.rb:68:in `perform_action_without_rescue'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
rescue.rb:160:in `perform_action_without_flash'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
flash.rb:146:in `perform_action_without_render_component'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
base.rb:532:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
base.rb:532:in `process_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
filters.rb:606:in `process'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
base.rb:391:in `process'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
base.rb:386:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
routing/route_set.rb:437:in `call'
---- migration that creates my really simple model
class CreateConfigItem < ActiveRecord::Migration
def self.up
create_table :config_items do |t|
t.string :key_name
t.string :key_value
t.text :description
t.timestamps
end
end
def self.down
drop_table :config_items
end
end
-- Controller ---
class ConfigItemsController < ApplicationController
active_scaffold :config_item do |config|
config.columns = [:updated_at, :key_name, :key_value]
end
end
--