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
Post a Comment