similar to: Only "form_tag" support uploading file?

Displaying 20 results from an estimated 4000 matches similar to: "Only "form_tag" support uploading file?"

2008 Apr 09
3
form_tag and form_for cause #protect_from_forgery errors
Hey All, I''m trying to do a simple form_for (and I also get it with form_tag) and I''m getting the following error: ActionView::TemplateError (No :secret given to the #protect_from_forgery call. Set that or use a session store capable of generating its own keys (Cookie Session Store).) on line #2 of users/new.fbml.erb: 1: <h1>Welcome To Courses, Let''s Get
2008 Oct 15
2
Adding an id to form_tag
Hi all, When using form_for it is easy to add an id to the form using :html => {:id => ''someid''} However, how would one accomplish the same when using the form_tag ? Thank you in advance, Schalk --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post
2009 Mar 09
2
form_tag error: only get requests allowed
I am getting above error while updating an item using form_tag helper. <h1>Edit Topic Item</h1> <% form_tag edit_topic_item_path(@item.topic, @item), :html => { :method => :put} do %> <%= render :partial => ''item_form'', :object => @item %> <%= submit_tag ''Save'' %> <% end %> <%= link_to ''Add
2013 Dec 10
2
form_tag + fields_for Rails 4
Hi There, I''m trying to user fields_for inside a form_tag, but i can''t catch it on my controller. I just take some html code off to makes it easy to read my view... i''m using campuses_path(current_church, @campus) instead form_for @campus, because my route is like resources :campuses, :path => ":church/campuses" <%= form_tag
2008 Sep 16
7
id in form_tag for update
I get an error saying Rails can''t find the post because I don''t have an id when doing the update. I have: <% form_tag ''/meetings/update'', :id => @calendar.id, :onsubmit => ''return ValidateMeeting()'' do %> Is this wrong? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You
2009 Mar 05
1
error_messages with form_tag
Hi Am facing a problem in accessing the error_messages. Actually am using form_tag is there any way with which i can access error_messages with form_tag. I don''t want to use form_for. Thanks in Advancve -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby
2007 Feb 13
1
form_tag only useful for pages with a single form?
Howdy, I''m new to rails and I''m learning form Agile Web Dev with Rails. It seems all of the examples that use form_tag use it in situations where the action first creates a new object before doing a request.post... If I''m in a situation where I''m managing Roles, Rights, and assignments of rights to roles, I may want to have one little form with a text field and
2006 Aug 02
7
form_for not working with Markaby
I''m playing around with Markaby and I decided to write a little blog app. I''m running into issues with forms however. If I use form_for the output of the form gets swallowed. For example: form_for :article, @article do |f| f.text_field :title f.check_box :published f.text_area :description f.text_field :pub_date f.text_area :content end gets rendered as an empty form
2008 Apr 25
2
multipart form_tag
I''m new to ruby, working on the book from Christian Hellsten & Jarkko Laine writen for RoR 1, so I had to adapt for RoR 2. I got the error : undefined local variable or method `multipart'' for #<#<Class:0xb714d388>:0xb714d360> Code : 1: <h1>Editing book</h1> 2: 3: <% form_tag( {:action => ''update'', :id => @book}, multipart
2006 Oct 13
2
form_for() and name
how can i give name attributes for form_for(), so it will give an output like <form name="f">. it is because that i need to access the form name for javascript manipulation. as far as i know, name can only used in form_tag(), but i currently have more than 50 forms that built using form_for(). the structure is like this: <% form_for symbol, item, :url => { :action
2008 Jul 11
1
form_tag and hidden text fields
Hello, while designing a form with the form_for tag, I m not being able to hide my text fields. Here is an excerpt of my code : <% form_for :foo, @foo, :url => { :controller=>"foo",:action => "create" } do |f| %> <tr> <td class="col2"><%= f.text_field :user_id, :type => ''hidden'', :value=>current_user.id
2006 May 28
4
File_column trouble, advice needed
Finally i have RMagick and the file_column plugin installed, but at the time of uploading images i have trouble, i get "uninitialized constant ArtImage" error and other errors, im following the instructions on http://wiki.rubyonrails.com/rails/pages/HowToUseFileColumn but doesnt seems to work, this its the code im using: #----view <%=
2010 Mar 29
6
Updating records
So I would like to be able to update a record without having to load the edit page. Lets use checking out a book as an example. From the front page of my application I would like to be able to have a form field where I can enter a record id and select one of a couple of check boxes and then hit submit which will update the associated record with the action selected by the check box (check out,
2008 Feb 04
2
attachment_fu and form_tag for multiple models?
hi, i''ve got a page where i''m trying to save the user''s profile information and an image of the user, but i''m having trouble with using attachment_fu and the form_tag method. now i know attachment_fu isn''t designed for form_tag but am really hoping someone has a solution for this as frankly i''m stumped. here''s the form_tag part in
2006 Mar 23
2
newbie - form_tag with get?
I can''t create a form with method "get". The rhtml code: <%= form_tag :controller => ''teritory'', :action => ''add'', :method => ''get'' %> The generated html code: <form action="/teritory/add?method=get" method="post"> What i''m doing wrong? -- They say money can''t
2009 Mar 09
4
undefined method `symbol_path'
I am getting following error while creating a new topic using RESTful design. But, everything works fine when I use <% form_tag :action => :create do %> . ActionView::TemplateError (undefined method `symbol_path'' for #<ActionView::Base:0xb72a2e40>) on line #3 of topics/new.rhtml: 1: <h1>New Topic</h1> 2: 3: <% form_tag :topic, :url => topics_path do %>
2008 Jul 14
5
How can i use link_to_remote with in form_for
Hi anybody plz help me how can i use link_to_remote with in form_for.. i tried but no luck... if i use form_tag i can able to use link_to_remote and made ajax call.but i need to use form_for ....can anyone help me how can i do with this.Thanks in advance. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2006 Jun 13
1
Easy question: need clarification of the form_for idiom
I''ve been trying wrap my head around one specific section of Recipe 57 in "Rails Recipes". The recipe is for image upload and processing. I?m staring at: <% form_for :image, @image, :url => {:action => ?create? }, :html => {multipart => true } do | f | %> ? <% end %> and the associated controller method ?create?: def create @image =
2006 Dec 07
6
form_tag not producing output
I''ve got two servers, both with Rails 1.1.6 on them. I''m trying to remove some of the newly-deprecated stuff in my app, and I''ve run into a problem. My login page used to look like this: <div title="Account login" id="loginform" class="form"> <h1>Please Sign In</h1> <%= start_form_tag :action =>
2011 May 27
4
undefined method `model_name' for NilClass:Class in a form_for
Hi! I know that there are other topics about this issue, I read them and I''m always blocked. Here is the error message: undefined method `model_name'' for NilClass:Class Extracted source (around line #30): 27: 28: <h2>Add Translation</h2> 29: 30: <%= form_for @new_trad do |f| %> 31: Locale: <%= f.text_field :locale %> 32: Key : <%=