fix other controllers needing create/update changed for rails 4
This commit is contained in:
parent
919fc0a60f
commit
7c28070978
4 changed files with 7 additions and 7 deletions
|
@ -180,7 +180,7 @@ class MapsController < ApplicationController
|
|||
respond_to do |format|
|
||||
if !@map
|
||||
format.json { render json: "unauthorized" }
|
||||
elsif @map.update_attributes(params[:map])
|
||||
elsif @map.update_attributes(map_params)
|
||||
format.json { head :no_content }
|
||||
else
|
||||
format.json { render json: @map.errors, status: :unprocessable_entity }
|
||||
|
|
|
@ -45,7 +45,7 @@ class MetacodeSetsController < ApplicationController
|
|||
# POST /metacode_sets.json
|
||||
def create
|
||||
@user = current_user
|
||||
@metacode_set = MetacodeSet.new(params[:metacode_set])
|
||||
@metacode_set = MetacodeSet.new(metacode_set_params)
|
||||
@metacode_set.user_id = @user.id
|
||||
|
||||
respond_to do |format|
|
||||
|
@ -70,7 +70,7 @@ class MetacodeSetsController < ApplicationController
|
|||
@metacode_set = MetacodeSet.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
if @metacode_set.update_attributes(params[:metacode_set])
|
||||
if @metacode_set.update_attributes(metacode_set_params)
|
||||
|
||||
# build an array of the IDs of the metacodes currently in the set
|
||||
@currentMetacodes = @metacode_set.metacodes.map{ |m| m.id.to_s }
|
||||
|
|
|
@ -51,7 +51,7 @@ class MetacodesController < ApplicationController
|
|||
# POST /metacodes
|
||||
# POST /metacodes.json
|
||||
def create
|
||||
@metacode = Metacode.new(params[:metacode])
|
||||
@metacode = Metacode.new(metacode_params)
|
||||
|
||||
respond_to do |format|
|
||||
if @metacode.save
|
||||
|
@ -70,7 +70,7 @@ class MetacodesController < ApplicationController
|
|||
@metacode = Metacode.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
if @metacode.update_attributes(params[:metacode])
|
||||
if @metacode.update_attributes(metacode_params)
|
||||
format.html { redirect_to metacodes_url, notice: 'Metacode was successfully updated.' }
|
||||
format.json { head :no_content }
|
||||
else
|
||||
|
|
|
@ -21,7 +21,7 @@ class SynapsesController < ApplicationController
|
|||
# POST /synapses
|
||||
# POST /synapses.json
|
||||
def create
|
||||
@synapse = Synapse.new(params[:synapse])
|
||||
@synapse = Synapse.new(synapse_params)
|
||||
|
||||
respond_to do |format|
|
||||
if @synapse.save
|
||||
|
@ -38,7 +38,7 @@ class SynapsesController < ApplicationController
|
|||
@synapse = Synapse.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
if @synapse.update_attributes(params[:synapse])
|
||||
if @synapse.update_attributes(synapse_params)
|
||||
format.json { head :no_content }
|
||||
else
|
||||
format.json { render json: @synapse.errors, status: :unprocessable_entity }
|
||||
|
|
Loading…
Reference in a new issue