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
/* | |
* This is a manifest file that'll automatically include all the stylesheets available in this directory | |
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at | |
* the top of the compiled file, but it's generally better to create a new file per style scope. | |
*= require_self | |
*= require_tree . | |
*= require layout | |
*/ |
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
#instead of | |
def foo | |
end | |
def foo.bar | |
'foobar' | |
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 Book < ActiveRecord::Base | |
def self.by_authors(author_ids) | |
where(:author_id => author_ids).map{ |book| | |
issuer = book.issuer | |
issuer.foo = boo.foo | |
} | |
end | |
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
root :to => 'user#home', :constraints => lambda {|r| | |
r.env['warden'].user.class.name == 'User' | |
} | |
root :to => 'organizer#home', :constraints => lambda {|r| | |
r.env['warden'].user.class.name == 'Organizer' | |
} |
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 MyModel < ActiveRecord::Base | |
after_initialize :setup_defaults | |
attr_accessor :foo_bar | |
def setup_defaults | |
@foo_bar ||= "my default value" | |
end | |
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 MyModel < ActiveRecord::Base | |
attr_accessor :foo_bar | |
def foo_bar | |
@foo_bar || [] | |
end | |
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 MyModel < ActiveRecord::Base | |
attr_accessor :foo_bar | |
def foo_bar | |
@foo_bar || [] | |
end | |
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
begin | |
subject.title = (document/"title").first.inner_html | |
rescue | |
subject.title = '' | |
end | |
begin | |
subject.description = (document/"meta[subject.name=description]").first[:content] | |
rescue | |
subject.description = ActionController::Base.helpers.strip_tags((document/"p").first.inner_html) |
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
begin | |
variable = x.some_method.hax | |
rescue | |
variable = x.some_method.foo | |
rescue | |
variable = x.some_method.bar | |
end | |
#I would like to acheive something similar to: | |
variable = x.some_method.hax |
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
Thank you for your continued patience during this process. Our specialists | |
have re-reviewed your accounts and have determined that our decision is | |
correct and final. As a result, your account and any related accounts that | |
you may have created have been suspended, and your ads will no longer run | |
on Google. | |
NEXT STEPS | |
, our support team is unable to provide any further information on this | |
matter. | |
- Please refrain from creating additional AdWords accounts, as they will | |
be subject to the same suspension. |