class Object

Constants

CONFIG

Put application’s parameters into config.yml

CRLF
WINDOWS

Public Instance Methods

update() click to toggle source
Calls superclass method
# File lib/generators/leolay/templates/app/admin/users.rb, line 12
def update
  unless params[:<%= options[:auth_class].downcase %>]['password'] && params[:<%= options[:auth_class].downcase %>]['password'].size > 0
    params[:<%= options[:auth_class].downcase %>].delete 'password'
    params[:<%= options[:auth_class].downcase %>].delete 'password_confirmation'
  end
  super do
    #do something
  end
end
valid_attributes() click to toggle source

This should return the minimal set of attributes required to create a valid <%= class_name %>. As you add validations to <%= class_name %>, be sure to update the return value of this method accordingly.

# File lib/generators/rspec/leosca/templates/controller_spec.rb, line 27
def valid_attributes
  <%= formatted_hash(example_valid_attributes) %>
end

# This should return the minimal set of values that should be in the session
# in order to pass any filters (e.g. authentication) defined in
# <%= controller_class_name %>Controller. Be sure to keep this updated too.
def valid_session
  {}
end