Move dashboard poll partial to component
This commit is contained in:
13
app/components/dashboard/poll_component.rb
Normal file
13
app/components/dashboard/poll_component.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class Dashboard::PollComponent < ApplicationComponent
|
||||
attr_reader :poll
|
||||
|
||||
def initialize(poll)
|
||||
@poll = poll
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def proposal
|
||||
poll.related
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user