Module: Rails::RFC6570

Extended by:
RFC6570
Included in:
RFC6570
Defined in:
lib/rails/rfc6570.rb,
lib/rails/rfc6570/version.rb,
lib/rails/rfc6570/visitor.rb,
lib/rails/rfc6570/formatter.rb

Defined Under Namespace

Modules: ControllerExtension, Extensions, Helper, VERSION Classes: Formatter, Railtie, Visitor

Instance Method Summary collapse

Instance Method Details

#build_url_template(ctx, route, **kwargs) ⇒ Object



138
139
140
# File 'lib/rails/rfc6570.rb', line 138

def build_url_template(ctx, route, **kwargs)
  route.to_rfc6570(ctx: ctx, **kwargs)
end

#params_for(controller, action) ⇒ Object



131
132
133
134
135
136
# File 'lib/rails/rfc6570.rb', line 131

def params_for(controller, action)
  ctr = "#{controller.camelize}Controller".constantize
  ctr.rfc6570_defs[action.to_sym] if ctr.respond_to?(:rfc6570_defs)
rescue NameError
  nil
end