move login_from from model folder to form folder
This commit is contained in:
16
app/forms/login_form.rb
Normal file
16
app/forms/login_form.rb
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
class LoginForm
|
||||||
|
include ActiveModel::Model
|
||||||
|
include ActiveModel::Validations
|
||||||
|
|
||||||
|
attr_accessor :emp_id, :password
|
||||||
|
validates_presence_of :emp_id, :password
|
||||||
|
|
||||||
|
def persisted?
|
||||||
|
false
|
||||||
|
end
|
||||||
|
|
||||||
|
def initialize(attributes={})
|
||||||
|
super
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user