search for: practice_ids

Displaying 5 results from an estimated 5 matches for "practice_ids".

Did you mean: practice_id
2013 Oct 23
3
Rails 4 and HABTM Checkboxes: Unpermitted parameters error
I have a simple Rails 4 project with two scaffolded models: Practice and Practitioner. I have set these both as habtm and am in the process of adding checkboxes to the Practitioner form so that I can check off the practices that this practitioner belongs to. In the practitioners_controller, I added practice_ids to the practitioner_params permit list, but I am still getting the error: Started PATCH "/practitioners/1" for 127.0.0.1 at 2013-10-23 16:35:34 -0400 Processing by PractitionersController#update as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=&gt...
2010 Sep 25
3
Factory_girl association with specific values
Hope this should be simple: I have a User model and a Role model. Factories for each. When I create a User using FG, I want to assign a specific role. Cant seem to figure out how to do this, getting errors like: uninitialized constant SysadminRole for doing things this way: Factory.define :user do |u| u.practice_id { |a| a.association(:practice).id } u.password ''password1''
2010 Dec 09
15
Rails 3 Active Record query returns "undefined method `loaded?' for #<Array:0x126a4c>"
I am getting this error on an rspec test: undefined method `loaded?'' for #<Array:0x126a4c> When I call: Practice.includes("practice_members").all Practice has_many :practice_members PracticeMember belongs_to :practice Practice.all returns: [#<Practice id: 6, name: "Practice One", created_at: "2010-12-09 15:40:46", updated_at: "2010-12-09
2010 Dec 23
0
has_many :through full stack help
...entations has_many :systems, :through => :implementations validates_presence_of :name, :tax_id end -----SYSTEM MODEL------- class System < ActiveRecord::Base attr_accessible :system_publisher, :system_name, :system_type, :system_version, :system_version_certified, :practice_ids has_many :implementations has_many :practices, :through => :implementations end -----IMPLEMENTATION MODEL----- class Implementation < ActiveRecord::Base attr_accessible :system_start_date, :system_stop_date, :system_implemented_by, :system_ids, :practice_ids belongs_to :system bel...
2011 Aug 09
4
Nesting select and text_field in radio_button
I''m creating my first Rails app and need an idea creating forms. I have Meeting model with place attribute. I want to have two fields for Meeting.place = one would be select with places from other meetings or text_field if the place is being used first time. User would be selecting radio_button of which field he has used. So is there any way to nest select and text_field within 2