Skip to content

Instantly share code, notes, and snippets.

@s6577t
Created September 30, 2011 17:19
Show Gist options
  • Select an option

  • Save s6577t/1254399 to your computer and use it in GitHub Desktop.

Select an option

Save s6577t/1254399 to your computer and use it in GitHub Desktop.
Using blobject in a controller
class MyController < ApplicationController
def params
@blobject_params ||= Blobject.new(super)
end
def create
model = find_model
data = params.user_data
if params.has_password?
log("UPDATED: " + data.email)
model.update_attributes(data)
respond_with model
end
redirect_to 'http://rickroller.com'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment