Sha256: 21b0412020189b91d14c43ae2c34717b95857ac1ee751a5cbe8500bdfdff8b3c

Contents?: true

Size: 541 Bytes

Versions: 9

Compression:

Stored size: 541 Bytes

Contents

# encoding: utf-8

Link2.setup do |config|
  # Configure how - and in what order - link labels should be looked up.
  config.i18n_scopes = [
    '{{model}}.links.{{action}}',
    'links.{{action}}'
  ]

  # Configure any custom action mappings.
  config.action_mappings = {
    :home => lambda { '/' },
    :back => lambda { |url| url || :back }
  }
  # TODO: Make procs containing routes work.
  # config.action_mappings = {
  #   :home => lambda { root_path },
  #   :back => lambda { |url| url || session[:return_to] || :back }
  # }
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
link2-0.1.10 test/integration/rails_app/config/initializers/link2.rb
link2-0.1.9 test/integration/rails_app/config/initializers/link2.rb
link2-0.1.8 test/integration/rails_app/config/initializers/link2.rb
link2-0.1.7 test/integration/rails_app/config/initializers/link2.rb
link2-0.1.6 test/integration/rails_app/config/initializers/link2.rb
link2-0.1.5 test/integration/rails_app/config/initializers/link2.rb
link2-0.1.4 test/integration/rails_app/config/initializers/link2.rb
link2-0.1.3 test/integration/rails_app/config/initializers/link2.rb
link2-0.1.1 test/integration/rails_app/config/initializers/link2.rb