Displaying 15 results from an estimated 15 matches similar to: "3 models in a form."
2011 May 03
0
Simple_Form and Simple_Fields_For and working in Form_Tag, Fields_For
I have this form and i got it working as i want:
<%= form_tag(update_individual_photos_path, :method => "put") do %>
<%= fields_for "photos[]", @photo do |f| %>
.................
<% end -%>
<%= submit_tag("Post") %>
<% end %>
But i would like to move to doing this with simple_form_for and
simple_fields_for but i cant get it
2012 Oct 09
0
Form Design issue - How to handle a parent association input..
I have an Event Model with a parent Place association
class Event < ActiveRecord::Base
belongs_to :place
accepts_nested_attributes_for :place
attr_accessible :place_attributes
In a new event registration form, the user should have the choice to :
- select from an existing Place
- enter a new Place in a nested form
= simple_form_for @event
= f.association :place, :collection =>
2012 Aug 07
9
How do I force link_to/form helpers to use the superclass name in the path instead subclass?
I want my helpers to generate paths using a superclass instead of the
subclasses. Assuming I have Owner and Member that both inherit from User,
rails will use the current objects class name when generating paths:
Let''s say current_user is a mod: <%= link_to current_user.name,
current_user %> will generate "/mod/:id". I want to force it to generate
2012 Feb 26
0
how to get the index of the element passed to the render view ?
I am displaying a collection of expenses in a form
the view in which the fom is displayed :
...
= simple_form_for(@project, :html => {:class => ''form-stacked'' })
do |f|
- unless @project.expenses.count > 0
No expenses
- else
#expenses
= f.fields_for :expenses do |f|
= render "backoffice/projects/expense_fields", :f
2012 Jan 07
2
set a default value with simple_form
hello
anyone know how i can set a default integer value with simple_form, i
have code like this below in my view but its not working.
<%= f.input :age, :value => ''30'' %>
i would like the input box to have the value of 30 by default
thanks for any help.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google
2014 Mar 14
0
AngularJS options with a simple_form checkbox
Hi guys,
How does one assign ng-model to a checkbox in simple_form? I have tried
adding it like this:
=f.input :super_admin , label: false, checked_value: true, unchecked_value:
false, as: :boolean,:input_html=>{"ng-model"=>"superadmincbx"}
but my ng-hide does not work.
%span{"ng-hide"=>"superadmincbx"}
I'm also using the Batarang
2011 Sep 01
0
do you think it's the best solution?
I have:
class Shop < ActiveRecord::Base
has_many :documents, :dependent => :restrict
has_many :roles, :dependent => :restrict
accepts_nested_attributes_for :documents
accepts_nested_attributes_for :roles
the shop _form is:
= simple_form_for(@shop) do |shop_f|
= render ''shared/error_messages'', :object => @shop
= render :partial =>
2013 Jan 04
0
Add data in between Simple Form association members
Hey there,
I am trying to use Simple Form''s association to list a bunch of radio
buttons like so:
<%= simple_form_for(@applicant) do |f| %>
<%= f.association :track, :as => :radio_buttons %>
<% end %>
Assuming each track has many courses, how can I take every track from that
association and loop over its courses to display them below the radio
2012 Jan 06
1
How to pass a field from simple_form as a hidden div value
Hi folks
Im trying to pass a value to my hidden div using simple_form but im
not sure how to do this, was wondering if anyone could help me with
this. Here is my view using simple_form
<%= f.label "First name" %>
<%= f.text_field :first_name %>
<%= f.label "Last name" %>
<%= f.text_field :last_name %>
<%= f.input :full_name, :as =>
2012 Jun 01
0
How to set the default value on a simple_form association
Folks
Im using simple_form and im able to see a selection of users from my
drop
down list but im trying to set the default value. Here is what ive tried
<%= f.association :people, :input_html => { :value => ''someval'' } %>
i want someval to be set in the selection by default. Any help would be
appreciated.
--
Posted via http://www.ruby-forum.com/.
--
You received
2007 Nov 01
0
libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie_html.c
libswfdec/swfdec_text_field_movie.c | 18 +++++++++++++++++
libswfdec/swfdec_text_field_movie_html.c | 32 +++++++++++++++++--------------
2 files changed, 36 insertions(+), 14 deletions(-)
New commits:
commit e1f14212d5a236453dd64426cfde8e6646b526d7
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date: Thu Nov 1 16:32:52 2007 +0200
Don't crash in TextField when
2007 Oct 22
0
12 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h test/trace
libswfdec/swfdec_as_strings.c | 1
libswfdec/swfdec_html_parser.c | 43 +++---
libswfdec/swfdec_text_field.c | 2
libswfdec/swfdec_text_field.h | 2
libswfdec/swfdec_text_field_movie.c | 166 ++++++++++++++++-----------
libswfdec/swfdec_text_field_movie.h | 6
libswfdec/swfdec_text_field_movie_as.c
2007 Oct 23
0
9 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_style_sheet.c libswfdec/swfdec_style_sheet.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h
libswfdec/swfdec_as_strings.c | 2 +
libswfdec/swfdec_html_parser.c | 41 ++++++++++++++++++++---
libswfdec/swfdec_style_sheet.c | 47 +++++++++++++++++++++++++++
libswfdec/swfdec_style_sheet.h | 6 +++
libswfdec/swfdec_text_field_movie.c | 24 +++++++++++--
libswfdec/swfdec_text_field_movie.h | 2 +
libswfdec/swfdec_text_field_movie_as.c |
2007 Nov 02
0
5 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_array.h libswfdec/swfdec_as_date.c libswfdec/swfdec_as_date.h libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_filter.c
libswfdec/swfdec_as_array.c | 2 -
libswfdec/swfdec_as_array.h | 2 -
libswfdec/swfdec_as_date.c | 2 -
libswfdec/swfdec_as_date.h | 2 -
libswfdec/swfdec_as_initialize.as | 1
libswfdec/swfdec_as_interpret.c | 1
libswfdec/swfdec_as_object.c | 38 ++++++++++++++++++++++++--------
libswfdec/swfdec_filter.c
2007 Oct 23
0
11 commits - libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_object.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_style_sheet.c libswfdec/swfdec_style_sheet.h
libswfdec/swfdec_as_internal.h | 4
libswfdec/swfdec_as_object.c | 25
libswfdec/swfdec_html_parser.c | 6
libswfdec/swfdec_initialize.as | 7
libswfdec/swfdec_initialize.h | 920 +++++++++++++++----------------
libswfdec/swfdec_style_sheet.c | 71 ++
libswfdec/swfdec_style_sheet.h | 8