On Mar 29, 8:37 am, HUNT HUNT
<li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>
wrote:> I created one Prototype helper.In that a method with following name is
> there
>
> def form_remote_tag_with_multipart_support(options = {}, &block)
> if options[:html][:multipart]
> uid = "a#{Time.now.to_f.hash.abs}"
> options[:html].merge!(:target => uid)
> iframe = capture_haml do
> haml_tag :iframe, :class => ''hidden'', :id
=> uid, :name => uid,
> :src => ''about:blank''
> end
> url_for_options = options[:html].delete(:action) ||
> url_for(options[:url])
> if block_given?
> haml_concat iframe
> form_tag url_for_options, options[:html], &block
> else
> <<-html
> #{iframe}
> #{form_tag url_for_options, options[:html]}
> html
> end
> end
> end
> end
>
> on view I write
> <%= form_remote_tag_with_multipart_support :service_list, :url=>
> service_path, :method => :post do |f|>
> <% render :partial=> "form" %>
> <%end%>
>
> its giving ActionView::TemplateError
What''s the stack trace behind the error? For starters your helper
doesn''t check that options[:html] exists, you''re calling it
with a
different number of parameters than you defined it with and you''re
using <%= even though you''re passing it a block.
Fred
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.