app/controllers/organizations_controller.rb in artfully_ose-1.2.0.pre.4 vs app/controllers/organizations_controller.rb in artfully_ose-1.2.0.pre.5
- old
+ new
@@ -20,11 +20,11 @@
def new
unless current_user.current_organization.new_record?
flash[:error] = "You can only join one organization at this time."
redirect_to organizations_url
end
-
+
if Organization.all.length > 0
flash[:error] = "There is already an organization created for this installation."
end
@organization = Organization.new
@@ -33,11 +33,11 @@
def create
if Organization.all.length > 0
flash[:error] = "There is already an organization created for this installation."
redirect_to new_organization_path and return
end
-
+
@organization = Organization.new(params[:organization])
if @organization.save
@organization.users << current_user
redirect_to organizations_url, :notice => "#{@organization.name} has been created"
@@ -59,7 +59,7 @@
flash[:notice] = "Successfully updated #{@organization.name}."
redirect_to @organization
else
render :show
end
- end
+ end
end