Displaying 20 results from an estimated 1700 matches similar to: "form question"
2008 Feb 25
6
Review Request for Significant Performance Improvement in ActiveRecord
I''m going through my old tickets, and I found an outstanding ticket
that I''ve put many hours into, and is absolutely critical for a
production project that I''m now updating to Rails 2.0.2. The ticket:
http://dev.rubyonrails.org/ticket/9560
This comes on the tail of:
http://dev.rubyonrails.org/ticket/9497
Which I believed to be the superior improvement due to a very
2008 May 22
3
SOAP client in Ruby/Rails
Hi all. I have a need to build a SOAP client using Ruby and Rails. I''m
accessing a document/literal style SOAP service. I''ve been poring over
documentation (well, there really doesn''t seem to be any, so that''s a
little misleading), blog posts, and outdated tutorials all day, and I
still don''t really have anywhere to begin. Every tutorial seems to
have a
2007 Apr 28
3
Learning ruby question
I''m having trouble understanding Ruby''s concept of scope. Could
someone explain the difference between the following 2 programs.
They both return the same output "aaaaaaaa", but I''m just not sure
about self in #1. Is self.day and self.title referring to and setting
class variables or are they instance variables? Thanks in advance.
# 1.
class Session
2006 Oct 22
1
Rails association and multiple indexes
Hi!
If I have two models, Product and Manufacturer, of course Product
belongs_to :manufacturer.
A search engine would allow a user to look for a product by its name or
manufacturer. Is it better to define a method like:
def searchable_field
"#{name} #{manufacturer.name}"
end
and add it as indexable field (acts_as_ferret :fields =>
2020 Jan 26
2
Vacation use different SMTP server
Thanks for idea but it won't work for me as 'internal domains' can be
anything, including gmail.com (and i don't know which of them are
really internal/local, this is decided by sending SMTP everytime
something is sent, based on MX records). Problem is that Dovecot/Sieve
is using wrong SMTP server (one used for receiving e-mails which
should NEVER be used for sending [and
2020 Jan 31
2
Vacation use different SMTP server
Op 28-1-2020 om 19:20 schreef azurit at pobox.sk:
> Really no more info?
You could do something with the sendmail_path or submission_host settings.
Regards,
Stephan.
>
>
>
>
> Cit?t azurit at pobox.sk:
>
>> Thanks for idea but it won't work for me as 'internal domains' can be
>> anything, including gmail.com (and i don't know which of them are
2008 Dec 02
4
Am I wrong or is fields_for not working right in Rails 2.2.2
I may be totally wrong about what the fields_for method is supposed to
do, but for some reason I thought using it scoped an object around an
association.
For example, I have a User class and when you''re creating a new user I
want to use fields_for to add a BillingAddress to the user like so:
<%- fields_for :billing_address do |billing_address_form| -%>
<%= render :partial
2008 Dec 02
4
Sharing a partial between multiple controllers
I want to share a partial between 2 or more controllers.
I have a "location" partial that I want users to enter "Address, City,
State, Zip" information in however I have "Payees", "Institution", and
"Event" models that can have "location" information stored with them.
Since I don''t want to duplicate the partial across each
2009 May 12
2
2.3 Nested Model Forms; build new without updating existing
I''m trying to build something similar to a Facebook messaging app, in
which the view displays all the messages for a particular thread, with
a form box for replying at the bottom of the thread.
The problem is that using fields_for generates form fields for each
existing record, and for one new record. In this case, there is no
need to edit existing messages - just a need to add new
2011 Jul 25
4
[Rails 3.0.9] I have trouble about fields_for
Hi,all. I''m new bee to Rails and I have trouble about fields_for
method..
It isn''t show up between the <%= f.fields ~ <% end %>
Please teach me some advice.
Thanks!
#new/_form.html.erb
<%= form_for(@user) do |f| %>
<div class="field">
<%= f.label :name %><br />
<%= f.text_field :name %>
</div>
<!-- Below
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
2011 Jul 11
2
Pre-populating association
Hello,
I think this is an easy one for the average Rails developer but I''m a bit stuck.
I''m creating a simple voting app: any user can create a survey, with any number of questions, and other users can then vote by creating a ballot for that survey.
Here''s the modeling:
class Survey < ActiveRecord::Base
has_many :questions
has_many :eligibilities
has_many
2010 Aug 13
2
Rails 3 / ActiveModel for Credit Card information?
When submitting billing information in the past I''ve always used
attr_accessor for credit card details as they should not be saved in
the database. In addition I always end up storing the card
expiration date so that the date form helper works correctly.
With Active Model it seems logical to create a CreditCard class to
hold this data instead.
**1st issue.**
It seems there still
2008 May 02
1
names of select elements inside a fields_for block not generated as expected
Hey All,
I''m trying to play along w/the ''complex forms 1'' railscast
(http://railscasts.com/episodes/73) and having trouble. The view is
projects/new. I''m trying to add some project_people to the form w/code
like so:
<% form_for(@project) do |f| %>
[project stuff here]
<% for pp in @project.project_person %>
<% fields_for
2009 Oct 15
1
fields_for weirdness
I just did a large upgrade to to Rails 2.3.4 and I am trying to make
use of the more modern view features.
I have a Newsletter object. Newsletter has many Sections.
I also have:
accepts_nested_attributes_for :sections
on the Newsletter object.
I have the typical scaffolded new.html.erb with:
<% form_for(@newsletter) do |f| %>
in there, I am trying to populate the first Section
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
2010 Nov 28
6
has_one accepts_nested_attributes_for fields_for NOT WORKING HELP
MODEL
class User < ActiveRecord::Base
has_one :address, :dependent => :destroy
accepts_nested_attributes_for :address
end
CONTROL
def new
@user = User.new
@user.build_address # Adicionei
...
VIEW partial _form
....
<% f.fields_for :address do |b| %> # Adicionei
<%= b.text_field :city_manual %> # Adicionei
<% end %>
2011 Apr 04
1
Best way to instanciate an empty address element in many nested fields_for
Hi!
I have 3 models, User, Company and Address.
Basically, a User belongs to a Company and an Address has one Company
(because it can be linked to other models).
In a form I want to display a User, its Company and its company Address,
with fields_for.
The problem is when my User has a Company, that does *not* have an Address:
the part containing the Address is not displayed.
I see 2 ways of
2011 Oct 26
6
Add an index to a form
Hello,
I''m having some trouble with forms, my app allows to enter data by
using a multi-step form that has 7 steps.
There are 3 steps that may let the user to add 1 form, for example
there''s a step called "children"
and that children has the following fields:
* name
* age
* gender
but one father may have more than 1 child and I''m adding another form
with
2012 Sep 08
4
dash symbol
In the example below, what is the dash doing between the class
attribute and array:
(field_helpers -
[:label, :check_box, :radio_button, :fields_for, :hidden_field, :file_field]).each
do |selector|
--
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