the tutorial at
http://www.onlamp.com/pub/a/onlamp/2007/01/05/revisiting-ruby-on-rails-revisited-2.html?page=3
uses this code:
<%= link_to %Q{#{category.send(column.name)}}, :action => ‘show’, :id
=> category %>
what is this %Q method?
the tutorial at
http://www.onlamp.com/pub/a/onlamp/2007/01/05/revisiting-ruby-on-rails-revisited-2.html?page=3
uses this code:
<%= link_to %Q{#{category.send(column.name)}}, :action => ‘show’, :id
=> category %>
what is this %Q method?
the tutorial at
http://www.onlamp.com/pub/a/onlamp/2007/01/05/revisiting-ruby-on-rails-revisited-2.html?page=3uses this code:
<%= link_to %Q{#{category.send(column.name)}}, :action => ‘show’, :id
=> category %>what is this %Q method?
It’s the same as using double quotes… but sometimes makes things
nicer… say when you want to embed a lot of double quotes in your
string
and not worry about escaping them.
irb(main):003:0> %Q{one “two” three}
=> “one “two” three”
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs