Module: SelfControl::Helper

Defined in:
lib/self-control/helper.rb

Instance Method Summary collapse

Instance Method Details

#step_url_for(resource, action_name, options = {}) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/self-control/helper.rb', line 3

def step_url_for(resource, action_name, options={})
  return unless resource
  return unless builder = resource.selfcontrol_builder
  action_name = action_name.to_sym
  action = builder.actions[action_name] || SelfControl::Action.new(action_name, options)
  action.url_from(resource,self).html_safe
end