CanCan would be simple to achieve what you want.Install cancan gem and
define Ability.rb in models
Sample Abillity.rb might look like this.
class Ability
include CanCan::Ability
def initialize(user)
# Define abilities for the passed in user here. For example:
#
user ||= Use
looks like the controller is assuming that the book_history table in
mysql's db.
have you specified the app to talk with mongodb.
other things like update and all worked for this tables? my opnion is
they might not work as well.
Thanks,
Siva
On 1/25/2012 2:16 PM, Lucky Nl wrote:
Hi friends,
Hi All,
can somebody help me on this.
--Siva
On 11/28/2011 6:41 AM, newrails user wrote:
Hi all,
I am facing problem in getting subdomain name inside the model. The
following is my setup.
I am using cancan for authorization.I wanted a specific condition in
Ability.rb ( the file which is plac
Sorry Now i got it.
you meant to say read each user object from the @site.users and operate
on them.
thanks a lot :-)
On 11/10/2011 10:05 PM, Colin Law wrote:
On 10 November 2011 16:20, Siva Prasad wrote:
On 11/10/2011 6:46 PM, Colin Law wrote:
On 10 November 2011 11:46, Siva Prasad
On 11/10/2011 6:46 PM, Colin Law wrote:
On 10 November 2011 11:46, Siva Prasad wrote:
Gurus,
Ok, I got chance to rework on it today.As Colin suggested i debugged the
code with the ruby debugger. Below is the details explained.
Controllers:
site_controller.rb
Gurus,
Ok, I got chance to rework on it today.As Colin suggested i debugged the
code with the ruby debugger. Below is the details explained.
*Controllers:*
site_controller.rb
def new
@site=site.new
@site.users.build
end
def create
@site=site.new([:par
6 matches
Mail list logo