search for: _ids

Displaying 6 results from an estimated 6 matches for "_ids".

Did you mean: _id
2012 Nov 03
0
ids writer fields for HABTM relationship.
Hello forum readers, Let''s say i have two models: Person and Role (i replicated the problem with Post & Tag as well, as i thought the problem was linked to some application-specific rights problem, but it wasn''t). In Person, attr_accessible role_ids is declared, so it accepts an array of Role ids as an argument when creating / updating. If i fire up the rails console and just do: [code] Person.first.role_ids = [1, 2, 3] [/code] Everything works so far. Now from the web browser, when trying to update a specific person, i get: [code] Started P...
2006 Aug 03
5
Cannot find gem for Rails error from dispatch.cgi
Hi All, I''m developing a Rails app with Rails v1.1.4, but when I upload it to Dreamhost and try to serve it with dispatch.cgi, I get the error "Cannot find gem for Rails =1.1.4". However, I have installed the 1.1.4 gem in my home directory and set GEM_PATH to look there; additionally, rake throws no errors and "rails -v" displays "Rails 1.1.4". Any
2006 Apr 01
7
Any way around AssociationTypeMismatch?
I want to have popup menus and check boxes in my forms to let users select associated objects. In the form I''m working on, the object "belongs_to" another type of object which is selected from a popup menu. The id of the chosen object(s) for association is passed back in the parameter hash, but when rails creates a new object from this parameter hash, I get a
2007 Mar 18
7
How to get more informations about an association at runtime
Hi all I''m working on a Custom Formbuilder. I want it to create me with a single method call checkboxes for a given HABTM association. My model looks like this: [code=ruby]class Member < ActiveRecord::Base has_and_belongs_to_many :preferred_music_styles, :class_name => ''MusicStyle'', :join_table =>
2006 Jul 27
0
CRUD, REST and associations
...ting form (_form.rhtml when spit out by the scaffold generator), I display a table of checkboxes and magazines where subscriptions are shown and can''t be changed. <!-- hidden field, to get a request param, even if no checkbox is selected --> <%= hidden_field_tag reader[magazine_ids][]'', '''' %> <table> <tr> <td></td> </tr> <% for magazine in reader.magazines %> <tr> <td><%= check_box_tag ''reader[magazine_ids][]'', magazine.id, @reader.subscribed_to?(mag...
2006 Apr 16
3
variable variables?
Hi everyone, Does Ruby support variable variables like PHP (http://www.php.net/manual/en/language.variables.variable.php)? Or do I have to use eval, like some_hash.each_pair{|key, pair| eval "#{key} = #{value}" } Or is there some other way? I''m actually trying to figure this out in order to use ez_where to create its conditions from a hash, so if this isn''t even