search for: istoseli

Displaying 4 results from an estimated 4 matches for "istoseli".

2009 Oct 01
9
Strange problem with "and" - "&&"
Hello I have a strange problem with this code: <%unless (@students.empty? and params[:commit].nil?) %> <%="test"%> <%= render :partial => ''results'' %> <% end %> Even though in some cases @students.empty? returns false and params [:commit].nil? returns true (or the opposite), it displays the test and the render area. I put before and
2011 May 28
4
Rais 3, nested attributes problem with paperclip
I have two models, one model girl and one girl_photos (a file upload asset). The only code I have in models which describes the association is: For the girl => belongs_to :girl and has_attached_file :photo For the model girl_photos => has_many :girl_photos and accepts_nested_attributes_for :girl_photos I''ve tried to save as a nested attribute the photo, it saves the association
2011 Jun 05
1
Cancan redirect back at AccessDenied
Hello I have a rails 3 app and I am trying to implement the redirect back action at access denied for cancan. If I try this in my application_controller: rescue_from CanCan::AccessDenied do |exception| redirect_to :back end It gives the following error: No HTTP_REFERER was set in the request to this action, so redirect_to :back could not be called successfully. If this is a test, make sure
2009 Sep 24
13
Rails Authentication Tutorial
Does anyone know a good authentication tutorial they can suggest? I''ve tried several restful authentication ones and an authlogic one on RailsCast. But with each one I try, something seems to be missing in the tutorial and I can''t get it to work. I''m new to Rails so it''s possible user error on my part. I''m on Mac OS X 10.5 and I generate all my apps in