Method: Js::Namespace::Framework#action_is?

Defined in:
lib/js_namespace_framework/helper_methods.rb

#action_is?(*args) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
24
25
26
27
28
# File 'lib/js_namespace_framework/helper_methods.rb', line 21

def action_is?(*args)
  return true if args.include? params[:action]
  
  return true if args.include? 'new' and params[:action].eql? 'create'
  return true if args.include? 'edit' and params[:action].eql? 'update'
  
  return false
end