similar to: has_one accepts_nested_attributes_for fields_for NOT WORKING HELP

Displaying 20 results from an estimated 700 matches similar to: "has_one accepts_nested_attributes_for fields_for NOT WORKING HELP"

2012 Aug 25
0
accepts_nested_attributes_for and fields_for not working!
I want to be able to create one menu object that has fields_for :brunch, :lunch, and :dinner. The menu object has_many brunches, lunches, and dinners, but each time I "edit", only one brunch, one lunch, and one dinner object are added. I''m using carrierwave to upload brunch_menus, lunch_menus, and dinner_menus (attributes of brunches, lunches, and dinners respectively) as
2009 Jun 24
1
accepts_nested_attributes_for :reject_if issue
I have the following models: class Order < ActiveRecord::Base belongs_to :billing_address belongs_to :shipping_address accepts_nested_attributes_for :billing_address accepts_nested_attributes_for :shipping_address, :reject_if => proc { |attributes| attributes[''has_shipping_address''] != ''1'' } def after_initialize self.build_billing_address
2009 Jul 28
0
'double' nest form fields with accepts_nested_attributes_for
Hi Is it possible to ''double'' nest form fields with accepts_nested_attributes_for? Something like: [code=ruby]<% form_for parent do |parent_form| %> <% parent_form.fields_for parent_children do |parent_children_fields| %> ... <% parent_children_fields.fields_for parent_child_activities do | parent_child_activities_fields| %>
2010 Feb 06
1
accepts_nested_attributes_for with has_many => :through
I have two models, links and tags, associated through a 3rd model, link_tags. I added the following to my link model, has_many :tags, :through => :link_tags has_many :link_tags accepts_nested_attributes_for :tags, :allow_destroy => :false, :reject_if => proc { |attrs| attrs.all? { |k, v| v.blank? } } and put this in a partial called by the new and edit forms for links,
2011 Jul 16
0
nested_form gem don't work for accepts_nested_attributes_for :limit
Hello, I have the next: class Post < ActiveRecord::Base has_many :image, :dependent => :destroy accepts_nested_attributes_for :image, :allow_destroy => true, :limit => 4 end class Image < ActiveRecord::Base belongs_to :Post ... paperclip settings ... end And the form view for the post is: <%= nested_form_for @post, :html => { :multipart => true } do |f| %>
2013 Nov 10
3
accepts_nested_attributes_for how, example
I have following tables with following models: users(id, role_id) *has_many :entries* categories(id, category_name) *has_many :entries* entries(id, category_id, user_id) *belongs_to :user, belongs_to :category, has_one :storage* storages(id, title, content, entry_id)* belongs_to :entry*, *has_one :vote* votes(id, count, storage_id) *belongs_to :storage* Now,
2010 Jan 26
2
accepts_nested_attributes_for :has_many :through => 'bug?'
Hey guys & ladies! I''ve got the following relationship which i''m trying to get accepts_nested_attributes to work with. But when i submit my form, it looks as if its expecting a Company object, rather than an array of companies. which really doesn''t make sense considering its a has_many :relationship. So what i''m after, is a way to
2013 Mar 14
0
[Rails 3.2] accepts_nested_attributes_for and time_select
Hi, I am upgrading a Rails application from Rails 3.1.11 to 3.2.12, but have a problem with ` accepts_nested_attributes_for` in conjunction with multipart attributes. The app is used to manage oral exams, so there is a model `Exam`, which has many `Examdate`s. When creating an exam, I can also create the examdates, consisting of a date, a start time and an end time. While the date field is
2010 Feb 25
1
accepts_nested_attributes_for vs. multiple controllers on one page
Hi, I''d like to render the results from show, create, edit and delete actions for several different models (one controller per model) on one page. While these several models are conceptually related, they do not need to be associated with each other. So, I''d rather not impose associations on them just to use accepts_nested_attributes_for to facilitate their presentation in a
2011 Sep 27
0
accepts_nested_attributes_for is not working for uniqueness
class User < ActiveRecord::Base accepts_nested_attributes_for :emails, :allow_destroy => true, :reject_if => proc { |attributes| attributes[''address''].blank? } end class Email < ActiveRecord::Base belongs_to :user validates_presence_of :address validates_email_format_of :address validates_uniqueness_of :address,
2010 Mar 09
0
undefined method `accepts_nested_attributes_for' for #<Class:
Sorry for the newb question, but it is: going through first steps I fond this exception. Have no idea, my rails version is 2.3.5 -- 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
2009 Jul 08
0
accepts_nested_attributes_for and has_one
Hi all, I''m seeing some unexpected behaviour in a nested model and I''m not sure if it''s a bug or if I''m doing something wrong. When assigning nested attributes, the associated object gets replaced with a new record. Example code: class Car < ActiveRecord::Base belongs_to :driver end class Car < ActiveRecord::Base belongs_to :driver end
2011 Apr 07
0
accepts_nested_attributes_for, validations, :inverse_of option on associations, and IdentityMap
This feels more like a question to ask the core list, forgive me if I trespass. I''ve been trying to help one of my cow orkers get through a sticky problem. He''s got a fairly complex nested form to update a model and its children. He''s started adding some validations, and we''ve encountered a number of issues: First he had a validation on one of the child
2003 May 10
4
Wireless IP phone for *PBX
Dear Guys, One of my customers ask me for a Wireless IP PBX, well the Asterisk fits IP PBX, But what about Wireless, ans also portable, a very special cutomer :) 1.-one possible solution is a PDA with one of those SIp softphones but VERY EXPENSIVE for the PDA 2.- a fxs channel bank and lots of Panasonic like wireless phone but the question is 1.- can my customer use all the features
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
2008 Jan 01
2
Non-Linear Quantile Regression
Please, I have a problem with nonlinear quantile regression. My data shows a large variability and the quantile regression seemed perfect to relate two given variables. I got to run the linear quantile regression analysis and to build the graph in the R (with quantreg package). However, the up part of my data dispersion seems a positive exponential curve, while the down part seems a negative
2019 Apr 08
2
Question about replacing the web interface with an audio stream
What’s wrong with reverse proxying icecast through apache? In my case, it’s just a measure to allow a secondary point of access to a stream from public wifi that only allows ports 80 and 443. Is it just a potential resource usage implication? > On Apr 7, 2019, at 6:12 PM, Humberto Rodriguez <sub at hrfinancial.com> wrote: > > Why not reproduce the stream using the <audio>
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
2013 Jan 31
2
Writing audio files (.wav) in a different directory
Hi. I'm trying to export a .wav file using the writeWave function from tuneR package in a different folder than the default getwd(). After reading through the manuals of some audio packages I couldn't figure it out. I'm picking one 3-hour .wav file and asking the function to take a sample of 1 minute (from minute 100 to minute 101 of the 3-hour file) and saving it in an object
2004 Dec 07
3
Question about e1/digium
Hi all I am beginning in asterisk and am making tests with an ata-186. For the time being the tests are going well, however have a doubt. I am thinking about using a canal e1 with plate digium. Assuming that the company of telecommunications supplies e1 with 30 canals and numeration to me 4000-0001 4000-0029. she is possible to configure asterisk in way that somebody of is dials 4000-0025, to