search for: terms_of_service

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

2008 Jan 30
0
prob linking to static page in public folder
For the first time, I''m trying to link to a static page and running into a problem... Here''s the link_to code: <%= link_to "Terms of Service", ''/terms_of_service.pdf'', :popup => true %> And here''s the error I''m getting: no route found to match "/terms_of_service.pdf" with {:method=>:get} Should be simple and everything I''ve found says to do it this way... but, I must be missing something or doing it...
2007 Dec 27
0
Silent Validation Failures
...he moment I uncomment the after_validation_on_create line in my model all the validations stop working. I only know they haven''t worked because the private methods throw NoMethodErrors when the user doesn''t enter something. Here''s an example: validates_acceptance_of :terms_of_service, :on => :create, :allow_nil => false validates_length_of :email, :within => 6..100 validates_uniqueness_of :user_alias, :email, :case_sensitive => false validates_inclusion_of :gender, :in => %w( m f ), :message => '': So what are you then?'' after_valid...
2006 Jan 08
3
Getting the current Action in the Model
Is it possible to get the current Controller''s action from within the Model? I have a situation where I want a piece of validation to run on edits, but not on new creates. Thanks, - Mark -- Posted via http://www.ruby-forum.com/.
2006 Apr 07
6
validation nightmare
Please help, I am really at a loss at how validation is supposed to work in rails. Model contains acts_as_tree I want to force my NEW objects to have a parent I do NOT want existing object to have a parent so I only want to have parent_id on create, NOT on update. I am trying this: def validate_on_create validates_presence_of :parent_id, :message => "You must specify a