I have the following model:
class Action < ActiveRecord::Base
# model code stuff
end
In the controller, I can do something like that:
class ActionsController < ApplicationController
# super simple update
def update
@action = Action.find(params[:id])
@action.update_attributes(params[:action])
end
end
Is it possible to make my Action model to be represented by 'something_action' in params array without renaming the model itself? I.e. so I can retrieve it like that:
@action.update_attributes(params[:something_action])
Any help would be appreciated?