Class: SexItUp::SexItUpImage
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- SexItUp::SexItUpImage
- Defined in:
- lib/sex_it_up.rb
Constant Summary collapse
- RESULT_LIMIT =
10
Instance Attribute Summary collapse
-
#sizes ⇒ Object
readonly
Returns the value of attribute sizes.
Class Method Summary collapse
-
.find_all(term) ⇒ Object
Want to give each user a unique avatar? Assign their profile image to the image returned here.
Instance Method Summary collapse
Instance Attribute Details
#sizes ⇒ Object (readonly)
Returns the value of attribute sizes.
22 23 24 |
# File 'lib/sex_it_up.rb', line 22 def sizes @sizes end |
Class Method Details
.find_all(term) ⇒ Object
Want to give each user a unique avatar? Assign their profile image to the image returned here.
26 27 28 29 30 |
# File 'lib/sex_it_up.rb', line 26 def self.find_all(term) query = "site:commons.wikimedia.org \"is in the public domain\" #{term}" cache_search(query, term) images_for(term) end |
Instance Method Details
#attachment_sizes ⇒ Object
36 37 38 |
# File 'lib/sex_it_up.rb', line 36 def @sizes||={:thumb => ["100x100"]} end |
#set_attachment_sizes(sizes = {:thumb => ["100x100"]}) ⇒ Object
32 33 34 |
# File 'lib/sex_it_up.rb', line 32 def (sizes = {:thumb => ["100x100"]}) @sizes = sizes end |