Namespace
Methods
- A
- T
-
- test_accessing_callable_concern_,
- test_accessing_concern_from_a_scope,
- test_accessing_concern_from_nested_resource,
- test_accessing_concern_from_nested_resources,
- test_accessing_concern_from_resource,
- test_accessing_concern_from_resources,
- test_accessing_concern_from_resources_using_only_option,
- test_accessing_concern_from_resources_with_more_than_one_concern,
- test_callable_concerns_accept_options,
- test_concerns_accept_options,
- test_concerns_executes_block_in_context_of_current_mapper,
- test_with_an_invalid_concern_name
Included Modules
- Routes
Constants
| Routes | = | ActionDispatch::Routing::RouteSet.new.tap do |app| app.draw do concern :commentable do |options| resources :comments, options end concern :image_attachable do resources :images, only: :index end concern :reviewable, Reviewable resources :posts, concerns: [:commentable, :image_attachable, :reviewable] do resource :video, concerns: :commentable do concerns :reviewable, as: :video_reviews end end resource :picture, concerns: :commentable do resources :posts, concerns: :commentable end scope "/videos" do concerns :commentable, except: :destroy end end end |
| APP | = | RoutedRackApp.new Routes |
Instance Public methods
app()
Link
test_accessing_callable_concern_()
Link
test_accessing_concern_from_a_scope()
Link
test_accessing_concern_from_nested_resource()
Link
test_accessing_concern_from_nested_resources()
Link
test_accessing_concern_from_resource()
Link
test_accessing_concern_from_resources()
Link
test_accessing_concern_from_resources_using_only_option()
Link
test_accessing_concern_from_resources_with_more_than_one_concern()
Link
test_callable_concerns_accept_options()
Link
test_concerns_accept_options()
Link
test_concerns_executes_block_in_context_of_current_mapper()
Link
# File actionpack/test/dispatch/routing/concerns_test.rb, line 111 def test_concerns_executes_block_in_context_of_current_mapper mapper = ActionDispatch::Routing::Mapper.new(ActionDispatch::Routing::RouteSet.new) mapper.concern :test_concern do resources :things return self end assert_equal mapper, mapper.concerns(:test_concern) end
test_with_an_invalid_concern_name()
Link
# File actionpack/test/dispatch/routing/concerns_test.rb, line 99 def test_with_an_invalid_concern_name e = assert_raise ArgumentError do ActionDispatch::Routing::RouteSet.new.tap do |app| app.draw do resources :posts, concerns: :foo end end end assert_equal "No concern named foo was found!", e.message end