dostaje taki błąd
[code] NoMethodError in Article#uuu
Showing app/views/article/uuu.rhtml where line #11 raised:
undefined method `each’ for #Article:0x86891e4
Extracted source (around line #11):
8: <% end %>
9:
10:
11: <% for name in @aart %>
12:
13: <% for column in Article.content_columns %>
14: <%=h name.send(column.name) %> | [/code]
a tutaj logi
[code]Processing UserController#login (for 127.0.0.1 at 2010-05-27 18:14:52) [GET]
Session ID: d9925b2c97f976904a1a445ec9a4d57a
Parameters: {“action”=>“login”, “controller”=>“user”}
Rendering user/login
Completed in 0.00500 (200 reqs/sec) | Rendering: 0.00400 (80%) | 200 OK [http://localhost/user/login]
Processing UserController#authenticate (for 127.0.0.1 at 2010-05-27 18:14:58) [POST]
Session ID: d9925b2c97f976904a1a445ec9a4d57a
Parameters: {“userform”=>{“password”=>“admin”, “user_name”=>“admin”}, “action”=>“authenticate”, “controller”=>“user”}
e[4;36;1mUser Columns (0.001000)e[0m e[0;1m select column_name as name, data_type as sql_type, data_default, nullable,
decode(data_type, ‘NUMBER’, data_precision,
‘FLOAT’, data_precision,
‘VARCHAR2’, data_length,
null) as limit,
decode(data_type, ‘NUMBER’, data_scale, null) as scale
from all_tab_columns
where owner = ‘SYSTEM’
and table_name = ‘USERS’
order by column_id
e[0m
e[4;35;1mUser Load (0.001000)e[0m e[0mselect * from (select raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM users WHERE (user_name = ‘admin’ and password = ‘admin’) ) raw_sql_ where rownum <= 1) where raw_rnum_ > 0e[0m
Redirected to http://localhost:3000/article/uuu?zm=1.0
Completed in 0.11700 (8 reqs/sec) | DB: 0.00200 (1%) | 302 Found [http://localhost/user/authenticate]
Processing ArticleController#uuu (for 127.0.0.1 at 2010-05-27 18:14:59) [GET]
Session ID: d9925b2c97f976904a1a445ec9a4d57a
Parameters: {“action”=>“uuu”, “controller”=>“article”, “zm”=>“1.0”}
e[4;36;1mArticle Columns (0.001000)e[0m e[0;1m select column_name as name, data_type as sql_type, data_default, nullable,
decode(data_type, ‘NUMBER’, data_precision,
‘FLOAT’, data_precision,
‘VARCHAR2’, data_length,
null) as limit,
decode(data_type, ‘NUMBER’, data_scale, null) as scale
from all_tab_columns
where owner = ‘SYSTEM’
and table_name = ‘ARTICLES’
order by column_id
e[0m
e[4;35;1mArticle Load (0.001000)e[0m e[0mselect * from (select raw_sql_., rownum raw_rnum_ from (SELECT * FROM articles WHERE (user_id = 1) ) raw_sql_ where rownum <= 1) where raw_rnum_ > 0e[0m
e[4;36;1mArticle Load (0.002000)e[0m e[0;1mselect * from (select raw_sql_., rownum raw_rnum_ from (SELECT * FROM articles WHERE (user_id = 1) ) raw_sql_ where rownum <= 1) where raw_rnum_ > 0e[0m
e[4;35;1mArticle Load (0.002000)e[0m e[0mSELECT * FROM articles WHERE (articles.id = 1) e[0m
Rendering article/uuu
ActionView::TemplateError (undefined method `each’ for #Article:0x86891e4) on line #11 of app/views/article/uuu.rhtml:
8: <% end %>
9:
10:
11: <% for name in
@aart %>
12:
13: <% for column in Article.content_columns %>
14: <%=h name.send(column.name) %> |
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1860:in `method_missing'
#{RAILS_ROOT}/app/views/article/uuu.rhtml:11:in `_run_rhtml_47app47views47article47uuu46rhtml'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:326:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:326:in `compile_and_render_template'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:301:in `render_template'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:260:in `render_file'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:806:in `render_file'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:711:in `render_with_no_layout'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/layout.rb:256:in `render_without_benchmark'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:50:in `render'
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:50:in `render'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1096:in `perform_action_without_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:113:in `handle_dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in `service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
c:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/webrick.rb:59
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
script/server:3
Rendering c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error)[/code]