Sha256: d111fa4927771b08040b597e4b7e68e4f697253935f122df266f3aa2895aff13

Contents?: true

Size: 365 Bytes

Versions: 1

Compression:

Stored size: 365 Bytes

Contents

module RestfulController
  module Actions
    module Update
      def update
        if instance_variable_get("@#{self.class.model_name}").update_attributes(model_params)
          redirect_to instance_variable_get("@#{self.class.model_name}"), notice: "Was successfully updated."
        else
          render action: 'edit'
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
restful-controller-0.0.3 lib/restful_controller/actions/update.rb