Showing app/views/frontend/get_months.html.erb where line #1 raised:
wr开发者_开发技巧ong number of arguments (0 for 1)
Extracted source (around line #1):
1: <%= render :partial => "months", :locals => {:form => form} %>
RAILS_ROOT: /rails_workcopy/er_spending_report
My get_month.html.erb has only one line of code.
if i use <%= form.select(...) %>, the error still occurs...
anyone can show me how to use render partial function?
Thanks in advance!
According to http://api.rubyonrails.org/classes/ActionView/Partials.html your render partial syntax is correct.
If there's only one line in get_month.html.erb I would wonder from where you get the local variable "form" is coming from. Maybe it should be @form?
Also keep in mind that the partial you want to render needs to start with an underscore. So in your example you need a file _months.html.erb
Try (assuming you're passing the form through a block in form_for:
<%= render 'months', :f => form %>
Any luck?
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论