houndci fixes

This commit is contained in:
Gopesh Tulsyan 2014-05-26 15:48:20 +05:30
parent a0aa523122
commit 65d9bd10b5
2 changed files with 3 additions and 2 deletions

View file

@ -26,7 +26,8 @@ class Admin::OrganizationsController < ApplicationController
def update def update
@organization = Organization.find(params[:id]) @organization = Organization.find(params[:id])
flash[:notice] = 'Organization was successfully updated' if @organization.update_attributes(params[:organization]) flash[:notice] = 'Organization was successfully updated'
if @organization.update_attributes(params[:organization])
respond_with @organization, location: admin_organizations_path respond_with @organization, location: admin_organizations_path
end end

View file

@ -6,7 +6,7 @@ class Organization < ActiveRecord::Base
validates_attachment_content_type :photo, validates_attachment_content_type :photo,
content_type: [/jpg/, /jpeg/, /png/, /gif/], content_type: [/jpg/, /jpeg/, /png/, /gif/],
size: { :in => 0..500.kilobytes } size: { in: 0..500.kilobytes }
validates_presence_of :title, validates_presence_of :title,
:email_id, :email_id,
:website_url :website_url