Skip to content

Instantly share code, notes, and snippets.

Created August 23, 2008 12:57
Show Gist options
  • Select an option

  • Save anonymous/6913 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/6913 to your computer and use it in GitHub Desktop.
class MerbPrivilege::Roles < MerbPrivilege::Application
def index
@role = Role.new unless @role
render
end
def create
@role = Role.new(:id => nil, :description => params[:role][:description])
@role.save
# works, but what about my @role object?
redirect url(:controller => 'roles', :action => 'index', :namespace => 'merb_privilege')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment