app/controllers/admin/resources_controller.rb in refinerycms-resources-0.9.9.18 vs app/controllers/admin/resources_controller.rb in refinerycms-resources-0.9.9.19

- old
+ new

@@ -31,13 +31,15 @@ end else if @resources.all?(&:valid?) @resource_id = @resources.detect(&:persisted?).id @resource = nil - end - insert + redirect_to :action => 'insert', :modal => from_dialog?, :wymeditor => from_dialog?, :dialog => from_dialog? + else + self.insert + end end end def insert self.new if @resource.nil? @@ -73,13 +75,13 @@ def restrict_controller super unless action_name == 'insert' end def paginate_resources(conditions={}) - @resources = Resource.paginate :page => (@paginate_page_number ||= params[:page]), - :conditions => conditions, - :order => 'created_at DESC', - :per_page => Resource.per_page(from_dialog?) + @resources = Resource.paginate :page => (@paginate_page_number ||= params[:page]), + :conditions => conditions, + :order => 'created_at DESC', + :per_page => Resource.per_page(from_dialog?) end end end