lib/find_mass_assignment.rb
# Return true if a controller string has a (likely) mass assignment problem.
# This is true if at least one of the controller's lines 
#   (1) Has a likely mass assignment
#   (2) The corresponding model doesn't define attr_accessible
Return true if a controller string has a (likely) mass assignment problem.
This is true if at least one of the controller's lines
(1) Has a likely mass assignment
(2) The corresponding model doesn't define attr_accessible
Return true if a controller string has a ( likely ) mass assignment problem . This is true if at least one of the controller ' s lines ( 1 ) Has a likely mass assignment ( 2 ) The corresponding model doesn ' t define attr_accessible
def mass_assignment_problem?
    c = File.open(self)
    problem = c.find { |line| line.mass_assignment? && line.problem_model? }
    !problem.nil?
  end
def mass_assignment_problem? c = File . open ( self ) problem = c . find { | line | line . mass_assignment? && line . problem_model? } ! problem . nil? end
Return true if a controller string has a (likely) mass assignment problem.
Return true if a controller string has a ( likely ) mass assignment problem .