.post{:class => ("gray" unless post.published?)}
More Related Contents:
- Using layouts in HAML files independently of Rails
- Combining implicit wait and explicit wait together results in unexpected wait times
- Code block passed to each works with brackets but not with ‘do’-‘end’ (ruby)
- Why use symbols as hash keys in Ruby?
- Where and how is the _ (underscore) variable specified?
- Array#each vs. Array#map
- What exactly is the singleton class in ruby?
- How do I copy a hash in Ruby?
- How to install PostgreSQL’s pg gem on Ubuntu?
- Ruby Array Initialization [duplicate]
- Using ‘return’ in a Ruby block
- Creating matrix with `Array.new(n, Array.new)`
- Best way to convert strings to symbols in hash
- Unexpected keyword_end error, yet syntax seems fine
- What does to_proc method mean in Ruby?
- Ruby single and double quotes
- String interpolation in Ruby doesn’t work?
- When to use ‘self’ in Ruby
- How can I calculate the day of the week of a date in ruby?
- What is a regex to match a string NOT at the end of a line?
- troubles with RVM and OpenSSL
- Can Ruby print out time difference (duration) readily?
- How do I format a date in ruby to include “rd” as in “3rd”
- How can I find the number of days between two Date objects in Ruby?
- Why is sum so much faster than inject(:+)?
- Rubygems: How do I add platform-specific dependency?
- Is there a hook similar to Class#inherited that’s triggered only after a Ruby class definition?
- How to convert JSON to a Ruby hash
- Difference between $stdout and STDOUT in Ruby
- Iterate over Ruby Time object with delta