Class: Buttafly::LegendsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Buttafly::LegendsController
- Defined in:
- app/controllers/buttafly/legends_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'app/controllers/buttafly/legends_controller.rb', line 16 def create @legend = Buttafly::Legend.new(data: legend_params) if @legend.save redirect_to contents_path, notice: "legend created" else redirect_to :back, notice: "not good" end end |
#edit ⇒ Object
28 29 |
# File 'app/controllers/buttafly/legends_controller.rb', line 28 def edit end |
#index ⇒ Object
31 32 |
# File 'app/controllers/buttafly/legends_controller.rb', line 31 def index end |
#new ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/controllers/buttafly/legends_controller.rb', line 8 def new @mapping = Buttafly::Mapping.find(params[:mapping_id]) @legend = @mapping.build_legend # binding.pry @headers = @mapping.get_origin_headers @new_record = @mapping.targetable_model.constantize.new end |
#show ⇒ Object
25 26 |
# File 'app/controllers/buttafly/legends_controller.rb', line 25 def show end |