This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ul | |
padding: 0 | |
margin: 0 | |
list-style: none none |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Member | |
# ... | |
class << self | |
# ... | |
def is_admin?(organization, user) | |
member = first(:conditions => {:organization_id => organization.id, :user_id => user.id}) | |
return false unless member | |
return member.role == 'admin' | |
end | |
# ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
undefined method `entries' for #<String:0x000001044e31f8> | |
/Users/m3talsmith/Development/bulletin-builder/app/models/organization.rb:229:in `create_parishes_from_feed' | |
/Users/m3talsmith/Development/bulletin-builder/app/models/organization.rb:215:in `block in create_or_update_all_parishes' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Bulletin | |
include Mongoid::Document | |
embeds_many :sections | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Bulletin | |
include Mongoid::Document | |
has_and_belongs_to_many :sections | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
property = Property.find(email.subject) | |
email_body = email.parts.first.body.parts.present? ? email.parts.first.body.parts.first.body.decoded : email.parts.first.body.decoded | |
drive_report = property.drive_report ? property.drive_report : DriveReport.new(:property => property) | |
drive_report.description = email_body | |
drive_report.save | |
if email.has_attachments? | |
# -- Image Mail Header Notes -- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def store_image(url, image_name) | |
host = url.split('/')[2] | |
path = "/#{url.split('/')[3..-1].join('/').gsub(/\?.*$/, '')}" | |
image_path = "#{Rails.root}/tmp/downloads/#{image_name}" | |
Net::HTTP.start(host) do |http| | |
response = http.get(path) | |
open(image_path, 'wb') do |file| | |
file.write(response.body) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rvm_project_rvmrc=1 | |
rvm_archflags="-arch x86_64" | |
rvm_install_on_use_flag=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe "Users" do | |
describe "signup" do | |
describe "failure" do | |
it "should not make a new user", :js => true do | |
visit new_user_registration_path |