This way it'll be easier to refactor it. Note there was a system test which tested both the callout and the form when unverified users visit a poll. We've split this system test in two component tests.
9 lines
193 B
Ruby
9 lines
193 B
Ruby
class Polls::CalloutComponent < ApplicationComponent
|
|
attr_reader :poll
|
|
use_helpers :can?, :current_user, :link_to_signin, :link_to_signup
|
|
|
|
def initialize(poll)
|
|
@poll = poll
|
|
end
|
|
end
|