Class: MagicLamp::FixturesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- MagicLamp::FixturesController
- Defined in:
- app/controllers/magic_lamp/fixtures_controller.rb
Constant Summary collapse
- ERRORS =
[ MagicLamp::ArgumentError, MagicLamp::AlreadyRegisteredFixtureError, MagicLamp::AmbiguousFixtureNameError, MagicLamp::UnregisteredFixtureError ].map(&:name)
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
21 22 23 |
# File 'app/controllers/magic_lamp/fixtures_controller.rb', line 21 def index render json: MagicLamp.generate_all_fixtures end |
#show ⇒ Object
16 17 18 19 |
# File 'app/controllers/magic_lamp/fixtures_controller.rb', line 16 def show MagicLamp.load_lamp_files render text: MagicLamp.generate_fixture(params[:name]) end |