houndci fixes

This commit is contained in:
Gopesh Tulsyan 2014-05-26 15:43:19 +05:30
parent c67700e0ae
commit a0aa523122
11 changed files with 39 additions and 36 deletions

View file

@ -45,7 +45,7 @@ class Conference < ActiveRecord::Base
accepts_nested_attributes_for :venue
accepts_nested_attributes_for :dietary_choices, :allow_destroy => true
accepts_nested_attributes_for :supporter_levels, :allow_destroy => true
accepts_nested_attributes_for :sponsorship_levels, :allow_destroy => true
accepts_nested_attributes_for :sponsorship_levels, allow_destroy: true
accepts_nested_attributes_for :event_types, :allow_destroy => true
accepts_nested_attributes_for :email_settings
accepts_nested_attributes_for :questions, :allow_destroy => true

View file

@ -2,15 +2,13 @@ class Organization < ActiveRecord::Base
attr_accessible :title, :photo, :email_id, :description, :website_url
has_many :sponsorship_registrations, dependent: :destroy
has_attached_file :photo,
:styles => {:thumb => "100x100>", :large => "300x300>" }
styles: { thumb: '100x100>', large: '300x300>' }
validates_attachment_content_type :photo,
:content_type => [/jpg/, /jpeg/, /png/, /gif/],
:size => { :in => 0..500.kilobytes }
content_type: [/jpg/, /jpeg/, /png/, /gif/],
size: { :in => 0..500.kilobytes }
validates_presence_of :title,
:email_id,
:website_url
validates_uniqueness_of :email_id
end

View file

@ -1,5 +1,5 @@
class SponsorshipRegistration < ActiveRecord::Base
attr_accessible :name, :email_id, :contact_no, :amount_donated, :method_of_donation,
attr_accessible :name, :email_id, :contact_no, :amount_donated, :method_of_donation,
:sponsorship_level_id, :conference_id, :organization_id
belongs_to :organization
belongs_to :sponsorship_level