Custom Method Validation Error in Rails Controller -


I'm new in the rail so please lend this question. I ran into a problem lately and if someone can help in finding the right solution I would be grateful.

I want to add this custom method to my approval. The user must have received a start date which has been submitted before an expiration date, with an error

  class request & lt; ActiveRecord :: Base verifies: start_date,: to_date, presence: true is valid: checkin_date_cannot_be_in_the_past def check_data_account_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ condition: if & gt; Unless this custom method does not work for me as described in the document and one of my controllers Error in (error syntax error, unexpected end-input, keyword_and is expected):  
  def new @request = Request.new end   

after search I can not find the right solution to spend some time in it, so I hope there is help to anyone here. Can?

Cheers

This must be valid to validate custom validation

  class request & lt; ActiveRecord :: Base Valid: Start_date, to-date, presence: validate true: checkin_data_kank_kot_a_text df checkin_dataCanat_b_i ___________________________________________ next. End of end date    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -