Module: Iord::Attriutes
Instance Method Summary collapse
- #attrs ⇒ Object
- #edit_attrs ⇒ Object
- #form_attrs ⇒ Object
- #index_attrs ⇒ Object
- #new_attrs ⇒ Object
- #show_attrs ⇒ Object
Instance Method Details
#attrs ⇒ Object
20 21 22 |
# File 'lib/iord/attributes.rb', line 20 def attrs @attrs ||= show_attrs - %i(_id created_at updated_at) end |
#edit_attrs ⇒ Object
36 37 38 |
# File 'lib/iord/attributes.rb', line 36 def edit_attrs form_attrs end |
#form_attrs ⇒ Object
28 29 30 |
# File 'lib/iord/attributes.rb', line 28 def form_attrs attrs end |
#index_attrs ⇒ Object
24 25 26 |
# File 'lib/iord/attributes.rb', line 24 def index_attrs attrs end |
#new_attrs ⇒ Object
32 33 34 |
# File 'lib/iord/attributes.rb', line 32 def new_attrs form_attrs end |
#show_attrs ⇒ Object
16 17 18 |
# File 'lib/iord/attributes.rb', line 16 def show_attrs @show_attrs ||= resource_class.attribute_names.map{ |i| i.to_sym } - %i(deleted_at) end |