Hi, I have read http://wiki.github.com/activescaffold/active_scaffold/tips and try to apply it in my application. My case is supposed to be easy, but I can't figure out how.
class Department < ActiveRecord::Base has_many :employees end class Employee < ActiveRecord::Base belongs_to: department end Department has a Boolean field web_access. Employee has a field web_access, enum (0, 1, 2) where 0 is deny, 1 is allow, 2 will use department's web access level. It is pretty straight-forward. There are 4 combination, 1: employee is 0, deny 2: employee is 1, allow 3: employee is 0 and department is 0, deny 4: employee is 0 and department is 1, allow The objective is to define a method is EmployeesController self.condition_for_web_access which does search either allow or deny. For example, allow would search employee 1 or employee 2 and department 1. Can someone help on this search? Thanks, -- You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en.
