Fix mongoid deeply nested polimorphic

Got the commit from github. The roles and sub_roles save.
This commit is contained in:
chris2tof committed 2011-12-19 21:22:26 +08:00
1 parent d27d7a623c
commit 4108ebf06d
11 files changed
+45 -41

No files matched your search

@@ -26,12 +26,14 @@ class Admin::RolesController < ApplicationController
end
def create
puts params.to_yaml
@attribute = Role.new(params[:role])
@attribute.save
redirect_to :action => :index
end
def update
puts params.to_yaml
@attribute = Role.find(params[:id])
@attribute.update_attributes(params[:role])
respond_to do |format|