Hi ,
presently i have one problem,
Ex:
i have 6 services
SERVICES = {
 :project_title => ''Tilte'',
 :project_description => ''Description'',
 :created_at => ''Created At'',
}
In these way i have 8 services
For each service i would like to give 4 permissions
1)create 2)read 3)write 4) update
all services are having same permissions
But know when i am writing the code
Site::SERVICES.keys.each do |service_key|
@site= User.new(:service_name =>
Userr::SERVICES[service_key.to_sym],:user_id => partner_id, :user_type
=> "Partner")
              @site.read_access = true
              @site.create_access = true
              @site.update_access = true
end
It is raising 8 Queiries for 8 Services and if services number increases
then Number of queries are also increases
So It is not good
I want to find the solution with a single Query !!!
Is it Possible??
-- 
Posted via http://www.ruby-forum.com/.
-- 
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.