On Feb 13, 7:47 am, Frederick Cheung frederick.che...@gmail.com
wrote:
On Feb 12, 10:01 am, msaspence msaspe...@gmail.com wrote:
I'm using the Authlogic so have followed the instructions
herehttp://rdoc.info/github/binarylogic/authlogic/master/Authlogic/TestCase
Have you tried
I'm the biggest noob in the world
the comparison was comparing them correctly
I had a typo in my test assertion that was causing it to fail when it
should have passed
apologies for the trouble
i will get on and look at ruby-debug though
--
You received this message because you are subscribed
I've got a show action for a map object which should return 200 if the
current_user is the maps owner
I have defined a method on my user object current? which returns
true or false if that user is the same as the current user
I have model spec set up for that which mocks UserSession.find.user
On Feb 12, 9:53 am, Colin Law clan...@googlemail.com wrote:
On 11 February 2011 22:40, msaspence msaspe...@gmail.com wrote:
I'm want to restrict access to an object show action to the owner
in my action I have this
def show
@thing = Thing.find(params[:id])
if current_user
On Feb 12, 9:21 am, Frederick Cheung frederick.che...@gmail.com
wrote:
On Feb 11, 10:40 pm, msaspence msaspe...@gmail.com wrote:
I'm want to restrict access to an object show action to the owner
in my action I have this
def show
@thing = Thing.find(params[:id
On Feb 12, 10:11 am, Colin Law clan...@googlemail.com wrote:
On 12 February 2011 10:00, msaspence msaspe...@gmail.com wrote:
On Feb 12, 9:53 am, Colin Law clan...@googlemail.com wrote:
On 11 February 2011 22:40, msaspence msaspe...@gmail.com wrote:
I'm want to restrict access
On Feb 12, 10:11 am, Colin Law clan...@googlemail.com wrote:
On 12 February 2011 10:00, msaspence msaspe...@gmail.com wrote:
On Feb 12, 9:53 am, Colin Law clan...@googlemail.com wrote:
On 11 February 2011 22:40, msaspence msaspe...@gmail.com wrote:
I'm want to restrict access
I'm want to restrict access to an object show action to the owner
in my action I have this
def show
@thing = Thing.find(params[:id])
if current_user @thing.owner == current_user
respond_to do |format|
format.json { render :json = @thing }
end
else
render
8 matches
Mail list logo