similar to: How to pass a field from simple_form as a hidden div value

Displaying 20 results from an estimated 8000 matches similar to: "How to pass a field from simple_form as a hidden div value"

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
2009 Nov 06
0
Nested objects not propagating from view
I thought I had this fixed, but apparently not. It works okay from the console, but not from the view. I have the following: # partial schema create_table "users", :force => true do |t| t.string "login", :null => false t.string "first_name" t.string "last_name" t.string "email", :null => false
2007 Nov 06
2
Why is this view spec failing?
I can''t figure out why I am getting a failure. It renders out fine in the browser. <h1>New member</h1> <%= error_messages_for :member %> <% form_for(:member, :url => members_path) do |f| %> <fieldset> <legend>Member Info</legend> <p><label for="member[first_name]">First Name:</label> <%=
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
2006 Apr 24
0
Updating a form containing array of text fields with has_many/belongs_to relation?
I''ve got a User class and an Employer class set up as follows: User.rb: has_many :employers Employer.rb belongs_to :user My tables are as follows: mysql> select id,first_name,last_name from users limit 5; +-----+------------+-----------+ | id | first_name | last_name | +-----+------------+-----------+ | 711 | Patrick | Stewart | | 714 | Larry | Davis | mysql>
2006 Feb 07
3
Newbie help ..
Hi .. I am new to Rails and it is not clear to me why I am getting the following error. Any help appreciated. -m. $cat app/views/admin/new.rhtml <% @page_title = "New member..." -%> <%= start_form_tag( :action => ''create'' ) %> <table> <tr> <td> First Name: </td> <td> <%= text_field(
2005 Feb 05
4
Creating collections
I''m trying to create a form where a collection is created, using the example from the Rails 0.9.5 weblog posting: http://weblog.rubyonrails.com/archives/2005/01/26/rails-095-a-world-of- fixes-and-tweaks/ I''m having a bit of trouble. The controller currently looks like this: class StudentController < ApplicationController def new render_text @params.inspect
2006 Jun 23
3
form_remote_tag is not passing form params
I''ve searched and searched and searched again, and I cannot find any help with this problem. There''s an identical problem on this forum, but it was never resolved. I''ll try to re-open the subject with a bit more information. Problem: The form_remote_tag() method in my "list" view is not passing the params[] hash of the values stored within my form.
2006 Nov 04
0
Check_box woes
I have a User model and an Address model. A user has_many addresses, and an address belongs_to a user. An address object for a user could be a billing, shipping or marketing address. The way I''m tracking this is via the user attributes: billing_adress_id, marketing_address_id and shipping_address_id in the user table, which holds the relevant address id. But in my form that allows a
2006 Aug 03
5
Rails - forms
Currently I have a registration form that is built like this: <label for="First name">First name</label> <%= text_field "user", "first_name" %><br> <label for="Last name">Last name</label> <%= text_field "user", "last_name" %><br> <label for="Email">Email</label>
2006 Feb 20
0
No Magic for HABTM forms?
Hi, I posted yesterday asking how to get form tags to reference the associated objects in a habtm relationship. I was hoping for Rails Magic, but it looks like Rails doesn''t have habtm magic beyond a certain point. Here was my solution for others who might have the problem. Also, I hope someone shows me that there is a simpler way. The Database Model: class Registration <
2007 Sep 20
2
Rendering a partial from within that partial
I am having trouble rendering a partial called ''names'' through a submit tag located within that partial. The form data is saving with my current code. However, the existing data is not loading into the form and the partial is not being re-rendered upon submission to reveal the changes to this data.What might I do to fix this? show.rhtml <%= javascript_include_tag :defaults
2006 Jun 20
2
Validation error_messages_for problem
I am having trouble getting error_messages_for to work. My controller(relevant parts) looks like def configure @account = session[:account] @user = User.new end def add_new_user_to_account @user = User.new(params[:user]) if @user.valid? session[:account].users << @user end redirect_to :action=> ''configure'' end end and my
2008 Jul 06
1
ActionView::Base.field_error_proc not getting an error field
In my User form I have standard field to get user record attributes (first_name, last_name and email) I also have a select drop_down to choose a role from an array first_name, last_name and email are user record attributes, but I defined the role name as a virtual attribute validates_presence_of :email, :last_name attr_accessor :role_name validates_presence_of :role_name, :if =>
2011 Mar 10
4
Multi-model forms
Hi guys, I''m new to ruby and rails and I''m working on multi model forms, specifically 3. I''m using this http://guides.rubyonrails.org/getting_started.html as a start, and its got a 2 Model example but I cant seem to get the last one working. These are my models: Country name:string code:string (has_one :address) Address address_line1:string
2006 Apr 05
2
RJS and remote forms
I''ve run into what I think is a browser bug related to using remote_forms pushed in an RJS update. In my controller, I have an action that creates a new model and returns a form for one of its children: def create_party party = Party.create render :update do |page| page.insert_html :top, ''party-list'', :partial => ''party_header'',
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
2005 Sep 26
1
[Fwd: [Rails] Re: Autocomplete - setting a second value?]
Yeah, right... I posted this to the Rails mailing list. Sorry for people who see duplicate posts. -------- Original Message -------- Subject: [Rails] Re: [Rails-spinoffs] Autocomplete - setting a second value? Date: Mon, 26 Sep 2005 10:05:24 -0400 From: Fran?ois Beausoleil <fbeausoleil@ftml.net> Reply-To: rails@lists.rubyonrails.org To: rails@lists.rubyonrails.org References:
2005 Dec 23
1
Overloading error_message_on method in ActiveRecordHelper
Hello all I would like to overload the error_message_on method in the ActiveRecordHelper module in order to emit a span tag instead of a div tag. I try to achieve this by way of plugins: Under vendor/plugins I''ve made a error_messages_on_fix directory, containing init.rb like this: --- require ''active_record_helper_fix'' --- ..and a lib directory with
2006 Feb 20
0
How to reference a field of an associated object in a text_field
Hi, I hope someone can help, I am stumped. I have a Registration ActiveRecord object. It records registrations for people for classes. class Registration has_and_belongs_to_many :people has_and_belongs_to_many :scheduled_courses end I have a form that allows someone to register. A registration form will register two people. They fill in their names, addresses, and the classes they