Displaying 20 results from an estimated 4000 matches similar to: "is f.submit in a form_for newer than submit_tag?"
2009 May 26
1
how does form_for and validate_presence_of work hand in hand
when we have validate_presence_of :name in the model and then when we
put in the create action that we re-render ''new'', then the form_for will
populate the fields, and error_messages_for ''story'' will have the
correct error message.
this is really great, and and the same time, this looks like magic... i
found that many books don''t explain how the magic
2009 Apr 21
12
still cannot install rails on windows
if i follow the instructions on:
http://agilo.us/2009/03/15/rails-on-windows/
the command
gem install sqlite3-ruby
will give
---------------------------------
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
c:/ruby/bin/ruby.exe extconf.rb
checking for fdatasync() in rt.lib... no
checking for
2009 May 26
9
cookies are mandatory for Rails app?
is it true that Rails depend on cookies? It seems that flash is a part
of session, and session uses cookies... so when i disable cookie in
Firefox, what was working became
ActionController::InvalidAuthenticityToken
so is it true that for a RoR app to work, cookies are mandatory?
--
Posted via http://www.ruby-forum.com/.
2007 Sep 28
2
RoR uses something rather than erb or eRuby?
it seems that RoR doesn''t use erb or eRuby to generate its output for
rhtml?
the program erb and the description of eRuby at
http://www.eruby.info
both said that
<% print "foo bar" %> or <% puts "hello" %>
will be placed into the output...
but currently for RoR, it won''t...
only <%= expr %> is doing it and it cannot be print or
2009 Oct 19
1
submit_tag or f.submit
Hello all,
I am pretty much new here, trying to move to RoR from .net world.
I will appreciate if anyone clarifies this for me.
Most of books use "submit_tag" in new or edit views, but I see Rails API
web documents use "f.submit" instead. I also see Agile Web Development
using RoR 3rd Edition use the same "f.submit" instead of "submit_tag."
Which way is
2008 Sep 09
2
form_for submit to a custom action
hi forum,
I am new to rails, and i am just getting my hang of things.
Problem,
how do you pass content captured in a form to a custom method?
I have the following form:
<% form_for :message, @message, :url => { :action => ''reply''} do |f|
%>
<table cellpadding="4" cellspacing="5">
<tr>
<td>Content:<%=
2009 Apr 21
3
attachment_fu giving problem on production
Hello friends,
I have configured attachment_f. It''s working fine on Local(development)
system but giving problem on production. Basically on production the
attachment_fu is not able to generate thumbnail image it saving the original
size image. Below is the configuration.
has_attachment :content_type => :image,
:storage => :file_system,
:max_size
2013 Mar 06
1
How to create multiple submit paths for form_for?
I''ve been researching this for some time and there doesn''t seem to be an
easy solution.
I have a form_for that submits materials. As usual, when it edits an
existing material it automatically goes to the update action. This is fine.
However, I want to have a second submit button "Save As" that allows a user
to save another version of the material. This second
2009 May 29
4
Mi browser no muestra el formato para captura desplegado
Hola,
Soy nuevo totalmente con ruby on rails..de hecho durante 15 a#os
programe con un RAD que no maneja codigo asi que estoy intentando
retomar este tipo de lenguajes nuevamente..y vaya que si han cambiando.
Estoy siguiendo un tutorial que indica como hacer una aplicacion
sencilla llamada ''DEPOT'', despues de sortear algunos problemas de
configuracion de mysql y el mismo rails
2009 Aug 16
2
rails form_for submit button
Hi,
Presently the submit button is coming as a button in below case.
<% form_for @chapter do |chapter_form| %>
... labels
... text_areas..
<%= chapter_form.submit ''Create'' %>
I want to build a custom button in CSS and show that instead of the
button.
Can anyone help me please?
2010 Mar 06
7
form_for, submit, and parameters disappearing
Consider the following:
--
Posted via http://www.ruby-forum.com/.
--
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
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 Dec 02
1
form_for with partial using do |@f|
Is it possible to pass this FormBuilder object to a controller and then
back to a partial?
I have a form rendering a partial that i would like to update with a
call to my controller based on user selectable parameters, but when the
AJAX comes back, i get this error message because i cannot pass a form
builder object between the controller and the view:
"undefined method
2006 Aug 11
2
Accessing belongs_to objects from a form_for context
In a form_for context, is there a way to access objects that are related
to the primary object with a belongs_to? I think an example will serve
best:
class User < ActiveRecord::Base
belongs_to :person
attr_accessor :username
end
class Person < ActiveRecord::Base
has_one :user
attr_accessor :first_name
end
<% form_for :user do |form| %>
<%= form.text_field
2008 Jul 21
6
form_for and select ( => f.select)
Hi All
I''m trying to combine the from_for and select helpers
Right now I have
form_for :service, :url => ...... do |f|
select("abc", "xyz_id", @my_arr.collect {|item| [ item, "bla" ] },
{:prompt => "opt1"} )
....
end
What I want to do is something like
....
f.select("abc", "xyz_id", @my_arr.collect {|item|
2007 Jul 31
1
form_for - over riding the controller that generates the form
Hello,
I am trying to install my login and search forms as default parts of
the layout. This is the code I am using:
<% form_for :user, :url => {:action => ''authenticate''} do |f| %>
<p>Username:<br /><%= f.text_field :username, :size => 30 %></p>
<p>Password:<br /><%= f.password_field :password, :size => 30
2003 Mar 19
1
WINBIND RUNS BUT DONT AUTH THE NT USERS
Good morning, I am posting msgs on the NON OPERATION of WINBIND. GOOD I
should say that without I had made any change in the system it started to
work in an of my facilities. INCREDIBLE but it worked. The problem now is
that I tried log in the samba not previously using an user servant in the
smbpasswd and him of autentication mistake. But should not WINBIND
facilitate that? Do I need to have user
2009 Oct 15
4
Getting the object in fields_for
I''m using the fields_for helper with accepts_nested_attributes_for
The System model has_many children.
If I do this in my haml template:
-form_for @system do |s|
=s.text_field :name
-s.fields_for :children do |child_fields|
=child_fields.text_field :name
all is fine. The fields_for iterates over all children and puts the
correct data in the fields.
But...what I
2007 Apr 13
1
How can I use aggregation objects in form_for?
Say I have a person object which has a aggregation object call
address. The the code to manipulate a form for create a new person
should be:
# new.rhtml
<% form_for :person, :url => {:action => ''create''} do |f| %>
<%= render :partial => ''form'', :locals => {:f => form} %>
<%= submit_tag "Create" %>
<% end %>
2010 May 26
6
Understanding Form_for
OK, so I''m an absolute noob at Ruby on Rails. I''ve read a lot of
information I can find about form_for and most of them use form_for to
create new items that get saved into the database and can be viewed
later to edit, destroy, etc. In this case, the database will fill up
with whatever the user wrote and I just want my program to have no
information stored.
I''ve been