Bonjour,
J'ai un soucis étrange avec mon application rails.
Pour faire simple :
Controlleur
Code :
class AbsenceFormsController < ApplicationController def index render :layout=>false end end
|
Vue :
Code :
- <html>
- <head>
- </head>
- <body>
- <h1><%="Absence form" %></h1>
- <% form_for :absence_form do |form| %>
- <% field_set_tag 'Personal Informations' do %>
- <%=form.text_field :firstname,:size=>35 -%>
- <%=form.text_field :lastname,:size=>35 -%>
- <%=form.date_select(:test) %>
- <h2><%='Reason' %></h2>
- <p class='submit'>
- <%= submit_tag 'Submit' -%>
- </p>
- <%end %>
- <%end %>
- </body>
- </html>
|
Ce qui produit cette erreur :
Citation :
Showing absence_forms/index.rhtml where line #10 raised :
wrong number of arguments (3 for 2)
|
Et la trace qui va avec :
Citation :
app/views/say/hello.rhtml:11:in `date_select'
app/views/say/hello.rhtml:11:in `_run_erb_47app47views47say47hello46rhtml'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/capture_helper.rb:141:in `call'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/capture_helper.rb:141:in `capture_erb_with_buffer'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/capture_helper.rb:44:in `capture'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/form_tag_helper.rb:409:in `field_set_tag'
app/views/say/hello.rhtml:8:in `_run_erb_47app47views47say47hello46rhtml'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/form_helper.rb:317:in `fields_for'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/form_helper.rb:253:in `form_for'
app/views/say/hello.rhtml:7:in `_run_erb_47app47views47say47hello46rhtml'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in `send'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in `execute'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in `send'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in `render'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:35:in `render'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:22:in `render_template'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:245:in `render_file'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1108:in `render_for_file'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:841:in `render_with_no_layout'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/layout.rb:259:in `render_without_benchmark'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:51:in `render'
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:51:in `render'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1157:in `default_render'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1163:in `perform_action_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:580:in `call_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:573:in `perform_action_without_benchmark'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:201:in `perform_action_without_caching'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:13:in `perform_action'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in `cache'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/caching/sql_cache.rb:12:in `perform_action'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `send'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in `process_without_filters'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:in `process_without_session_management_support'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in `process'
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:in `process'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:103:in `process_request'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:153:in `with_signal_handler'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:101:in `process_request'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:78:in `process_each_request'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:77:in `process_each_request'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:76:in `catch'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:76:in `process_each_request'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:50:in `process!'
/var/lib/gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:24:in `process!'
|
Le pire c'est que si je colle exactement le même code dans une application rails neuve crée pour l'occasion, ça marche...
Je soupsonne un de mes plugins de fouttre du bordel la dedans mais je sais pas trop comment le contrôler.. Vous avez une idée?
Merci d'avance
---------------
Si la vérité est découverte par quelqu'un d'autre,elle perd toujours un peu d'attrait