Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def profiles_with_rules
- profiles = Array.new
- raw_profiles = Profile.includes :rules
- raw_profiles.map { |raw_profile| profiles << OpenStruct.new(:name => raw_profile.name, :rules => raw_profile.rules.collect(&:name)) }
- end
Add Comment
Please, Sign In to add comment