Class: FactoryGirlWeb::FixturesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- FactoryGirlWeb::FixturesController
- Defined in:
- app/controllers/factory_girl_web/fixtures_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/factory_girl_web/fixtures_controller.rb', line 9 def create fixture = Fixture.new(permitted_params) if fixture.create redirect_to :back, notice: format("%{model} was successfully created.", model: fixture.name_i18n) else redirect_to :back, alert: fixture.errors..to_sentence end end |