RailsCasts Pro episodes are now free!

Learn more or hide this

iumehara's Profile

GitHub User: iumehara

Comments by


For those using Bootstrap, note that the preview won't work correctly until you disable bootstrap's default CSS of img { max-width: 100% } by specifying img { max-width: none ).
See here.


Hey all, like @Mark says above, be sure to use reputation_value_for.

Also, the reputation system requires different names for all types of reputations (ie. users and haikus can't share the same reputation name), so the code from the example would be more like:

has_reputation :votes, 
               source: :user, 
               source_of: [{ :reputation: :user_votes, :of => :user }]
               aggregated_by: :sum
has_reputation :user_votes, 
               source: {reputation: :votes, of: :haikus],                    
               aggregated_by: :sum