Class: Trailblazer::Cell
- Inherits:
-
Cell::ViewModel
- Object
- Cell::ViewModel
- Trailblazer::Cell
- Extended by:
- ViewName::Path
- Includes:
- Layout::External
- Defined in:
- lib/trailblazer/cell.rb
Defined Under Namespace
Modules: ViewName
Class Method Summary collapse
- .class_from_cell_name(name) ⇒ Object
-
.controller_path ⇒ Object
Comment::Cell::Show #=> comment/view/.
- .view_name ⇒ Object
- .views_dir ⇒ Object
Instance Method Summary collapse
-
#state_for_implicit_render(options) ⇒ Object
Comment::Cell::Show #=> show.
Methods included from ViewName::Path
Class Method Details
.class_from_cell_name(name) ⇒ Object
30 31 32 |
# File 'lib/trailblazer/cell.rb', line 30 def class_from_cell_name(name) name.camelize.constantize end |
.controller_path ⇒ Object
Comment::Cell::Show #=> comment/view/
35 36 37 |
# File 'lib/trailblazer/cell.rb', line 35 def controller_path @controller_path ||= File.join(util.underscore(name.sub(/(::Cell.+)/, '')), views_dir) end |
.view_name ⇒ Object
43 44 45 |
# File 'lib/trailblazer/cell.rb', line 43 def view_name @view_name ||= _view_name end |
.views_dir ⇒ Object
39 40 41 |
# File 'lib/trailblazer/cell.rb', line 39 def views_dir "view" end |
Instance Method Details
#state_for_implicit_render(options) ⇒ Object
Comment::Cell::Show #=> show
51 52 53 |
# File 'lib/trailblazer/cell.rb', line 51 def state_for_implicit_render() self.class.view_name end |