search for: role_type

Displaying 2 results from an estimated 2 matches for "role_type".

Did you mean: role_types
2009 May 12
4
has_many :through and scopes: how to mutate the set of associated objects?
...e a model layer containing Movie, Person, Role, and RoleType, making it possible to express facts such as "Clint Easterbunny is director of the movie Gran Milano". The relevant model and associations look like this class Movie < ActiveRecord::Base has_many :roles, :include => :role_type, :dependent => :destroy has_many :participants, :through => :roles, :source => :person do def as(role_name) self.scoped( :joins => ''CROSS JOIN role_types'', :conditions => [ "(roles.role_type_id = role_types.id) +...
2009 Jul 02
1
Rails Select Helper
Dear All, I m using the below select helper for my select helper which works fine. <%=privilege. select :AC,Role.find(:all,:conditions => {:role_type => "AC"}).collect {|c| [ c.role_name, c.id ] },{},{:class => "txtbox"} %> Its generates the below html... <select name="privilege[AC]" id="privilege_AC" class="txtbox"> <option value="4">Trainees</option> <...