similar to: rails 3.2 nested form names not correct

Displaying 20 results from an estimated 130 matches similar to: "rails 3.2 nested form names not correct"

2012 Oct 06
0
rails 3.2 question/answer with a through table
I have a person has many questions through person_questions. I have an extra column in the join table for the answer. The section below works for a new submit but when I edit I get 3 each with the first 2 of each selected tand the third not so I get 6 check boxes some selected some not. Is there a way to get this to work properly os just the questions in the db show up once each with the
2008 Mar 31
2
Rails and Partials
Excuse my ignorance on partials but..... I am trying to use partials to create a uniform display box built with html tables. The only way I have thought about accomplishing this is to create two partials: _start_box.erb ---------------- <table id="box" width="<%= width %>"><tr><th><%= h(label_text) %></th></tr><tr><td>
2013 Mar 04
0
fields_for with accepts_nested_attributes: how to pass a value to a label
I can''t figure out how to pass a value from the following object build in the controller: class TimesheetsController < AC ... def new @timesheet = current_user.timesheets.new now = Date.today #generating 7 time entries: monday through sunday (now.beginning_of_week..now.end_of_week).step { |date| @timesheet.time_entries.build(:workdate; date) end end ... In the
2010 Apr 10
1
accepts_nested_attributes + polymorphic association
im having an issue where my my polymorphic associations arent being deleted when using accepts nested attributes there are other accepts_nested_attributes being used and they are deleting fine, just the polymorphic association before i go down the path of intense thrashing at this...is this a known issue or problem? -- Posted via http://www.ruby-forum.com/. -- You received this message because
2006 Jul 04
1
Smart html output for an object?
Hi, I''m trying to make it so that an object can be easily printed into the html format I want. I''ve been focusing on using a case/when control structure, so let me start by showing you some code... I was trying to use this following code as a helper method, def print_question(question) @question = question case @question.question_type.code when
2013 Mar 25
1
validates presence of foreign key fails in nested form
I''m using accepts_nested_attributes as follows: class Timesheet < ActiveRecord::Base attr_accessible :status, :user_id, :start_date, :end_date, :activities_attributes has_many :activities, dependent: :destroy has_many :time_entries, through: :activities accepts_nested_attributes_for :activities, allow_destroy: true end class Activity < ActiveRecord::Base attr_accessible
2010 Oct 14
2
Nested form, perhaps?
I have a general design question, and haven''t written any code for this feature yet. I''m setting up a control panel for a sort of team/ content management system. A new project needs a team to work on it. The project has been saved, so we don''t have to worry about that. But each member of the team needs to have a role in relation to this project (they may have
1998 Oct 19
1
domain_master_node_status_fail: ... Cannot sync browser lists.
This looks like a bug to me, except . . . no one else seems to have encountered it, and it's in a pretty basic area, so there must be something wrong at our site. When the Unix server becomes a local master browser, Samba is unable to sync its browse list w/that of the DMB. None of our NT machines are having any trouble, and our tech. support guy says the DMB is in good health. Rebooting
2011 Dec 13
3
Validates presence
Hi everyone, I just need a quick help :) What is the best way to write some code in :presence option? I have a Question model and one of the fields is question_type: - example question - static question Each question has alternatives, and each of them has scores What I want is to validate the presence of :score, but when its only on the static question. I dont want to validate the presence
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 04
2
accepts_nested_attributes: undefined method 'association'_attributes
I have 2 models Timesheet and TimeEntry: class Timesheet < ActiveRecord::Base attr_accessible :status, :user_id, :time_entries_attributes has_many :time_entries, dependent: :destroy accepts_nested_attributes_for :time_entries, :reject_if => proc { |attributes| attributes[''worktime''].blank? } end class TimeEntry < ActiveRecord::Base attr_accessible :task_id,
2007 Nov 10
2
Problem with view spec - works inside the browser but spec fails with nil object
Hi, I''ve been trying to find an answer for this problem in the last couple hours, but I think no discussion was about this exact same thing. So here it goes, hope someone can help. I''m trying to spec a view which works correctly on the browser, but that generates the following error when I run "rake spec:views". ActionView::TemplateError in ''/survey/show
2007 May 03
7
How to create a drop-down list with Markaby?
Hi I couldn''t figure out, how to create a drop-down list with Markaby. How would I create something like this: <select name="character"> <option value="marvin">Marvin the paranoid Android</option> <option value="arthur">Arthur Dent</option> <option value="zaphod">Zaphod
2011 Feb 11
1
accept_nested_attributes, reject_if doesn't work.
class Post < ActiveRecord::Base validates :name, :presence => true validates :title, :presence => true, :length => { :minimum => 5 } has_many :comments, :dependent => :destroy has_many :tags accepts_nested_attributes_for :tags, :allow_destroy => :true, :reject_if => proc { |attrs| attrs.all? { |k, v| v.blank? or v.nil? } } end rails c
2006 May 03
8
hiding table IDs from users
I was wondering if anyone had thoughts on the most efficient way of making sure users never see internal table IDs? Clearly, scaffold views show a lot of IDs by default and those can be hidden. The problem seems to be all of the IDs that Rails passes around in URLs (such as http://mysite.com/user/show/12345). My primary concerns are security and confidentiality--one can imagine that there
2016 Oct 12
4
[test-suite] making polybench/symm succeed with "-Ofast" and "-ffp-contract=on"
On Tue, Oct 11, 2016 at 10:39 PM, Sebastian Pop <sebpop.llvm at gmail.com> wrote: > On Tue, Oct 11, 2016 at 10:20 PM, Hal Finkel <hfinkel at anl.gov> wrote: >> ----- Original Message ----- >>> From: "Renato Golin" <renato.golin at linaro.org> >>> To: "Sebastian Pop" <sebpop.llvm at gmail.com> >>> Cc: "Hal
2016 Oct 11
3
[test-suite] making polybench/symm succeed with "-Ofast" and "-ffp-contract=on"
On Mon, Oct 10, 2016 at 5:02 PM, Hal Finkel <hfinkel at anl.gov> wrote: > ----- Original Message ----- >> From: "Sebastian Pop" <sebpop.llvm at gmail.com> >> To: "Hal Finkel" <hfinkel at anl.gov> >> Cc: "Sebastian Paul Pop" <s.pop at samsung.com>, "llvm-dev" <llvm-dev at lists.llvm.org>, "Matthias
2007 Mar 16
0
libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_loader_internal.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_xml.c
libswfdec/swfdec_loader.c | 91 +++++++++++++++++++++++++++++++++++-- libswfdec/swfdec_loader.h | 13 +++++ libswfdec/swfdec_loader_internal.h | 2 libswfdec/swfdec_net_stream.c | 1 libswfdec/swfdec_root_movie.c | 4 + libswfdec/swfdec_xml.c | 9 +-- 6 files changed, 111 insertions(+), 9 deletions(-) New commits: diff-tree
2002 Aug 13
1
mdct.c pointer to array conversion
Hi all, I'm attempting to convert all the pointers to arrays the mdct_backward function so it can be partitioned off for a hardware implementation. Although this code is quite short I'm finding it a little tricky. As it stands, mdct_backward is passed values by reference i.e. void mdct_backward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out) o my modified version starts void
2016 Oct 10
2
[test-suite] making polybench/symm succeed with "-Ofast" and "-ffp-contract=on"
Hi, I would need some help to fix polybench/symm: void kernel_symm(int ni, int nj, DATA_TYPE alpha, DATA_TYPE beta, DATA_TYPE POLYBENCH_2D(C,NI,NJ,ni,nj), DATA_TYPE POLYBENCH_2D(A,NJ,NJ,nj,nj), DATA_TYPE POLYBENCH_2D(B,NI,NJ,ni,nj)) { int i, j, k; DATA_TYPE acc; /* C := alpha*A*B + beta*C, A is symetric */ for (i = 0; i < _PB_NI; i++) for (j = 0; j < _PB_NJ; j++) {