Module: Effective::Resources::Paths
- Included in:
- Effective::Resource
- Defined in:
- app/models/effective/resources/paths.rb
Instance Method Summary collapse
- #controller_file ⇒ Object
- #datatable_file ⇒ Object
- #flat_view_file(action = :index, partial: false) ⇒ Object
- #model_file ⇒ Object
- #view_file(action = :index, partial: false) ⇒ Object
Instance Method Details
#controller_file ⇒ Object
9 10 11 |
# File 'app/models/effective/resources/paths.rb', line 9 def controller_file File.join('app/controllers', namespace.to_s, "#{plural_name}_controller.rb") end |
#datatable_file ⇒ Object
13 14 15 |
# File 'app/models/effective/resources/paths.rb', line 13 def datatable_file File.join('app/datatables', namespace.to_s, "#{plural_name}_datatable.rb") end |
#flat_view_file(action = :index, partial: false) ⇒ Object
21 22 23 |
# File 'app/models/effective/resources/paths.rb', line 21 def flat_view_file(action = :index, partial: false) File.join('app/views', plural_name, "#{'_' if partial}#{action}.html.haml") end |
#model_file ⇒ Object
5 6 7 |
# File 'app/models/effective/resources/paths.rb', line 5 def model_file File.join('app/models', class_path.to_s, "#{name}.rb") end |
#view_file(action = :index, partial: false) ⇒ Object
17 18 19 |
# File 'app/models/effective/resources/paths.rb', line 17 def view_file(action = :index, partial: false) File.join('app/views', namespace.to_s, (namespace.present? ? '' : class_path), plural_name, "#{'_' if partial}#{action}.html.haml") end |