Created
June 3, 2015 06:09
-
-
Save sauy7/a281c76ffbf931c48690 to your computer and use it in GitHub Desktop.
Example using Devise's current_user with Trailblazer and Cells 4.0.0.beta5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# concepts/account/cell.rb | |
class Account::Cell < Cell:Concept | |
... | |
def show | |
render | |
end | |
class Grid < Cell::Concept | |
def show | |
concept('account/cell', collection: options[:current_user].accounts) | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%# views/accounts/index.html.erb %> | |
<%= concept("account/cell/grid", nil, current_user: current_user) %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This replaces:
as worked in beta3.