On Mar 4, 2015, at 8:32 AM, Daniel Loureiro loureir...@gmail.com wrote:
Hi everyone,
it's a silly question (and I'm kind of ashamed to ask it), but I frequently
must do things like that:
a.present? ? a : b
a.presence || b
Hi everyone,
it's a silly question (and I'm kind of ashamed to ask it), but I frequently
must do things like that:
a.present? ? a : b
or a real world example:
params[:user][:name].present? ? params[:user][:name] : default name
I think these are perfect cases to use a coalesce method.
Hi everyone,
it's a silly question (and I'm kind of ashamed to ask it), but I
frequently must do things like that:
a.present? ? a : b
a.presence || b
Whoa! Thank you Scott, you save my day.
--
Daniel Loureiro
--
You received this message because you are subscribed to the
I would say, Colin has given a sound advise. Do take a look at Activerecord
Associations http://guides.rubyonrails.org/association_basics.html and
other railsguides pages. They are really great!
Vineeth
On Tue, Mar 3, 2015 at 2:57 AM, Colin Law clan...@gmail.com wrote:
On 2 March 2015 at
Hi,
I am not able to see the css inside the PDF. the generated pdf will
display in black n white. Am getting images inside the pdf file. Please
see the below code that i have implemented. If anyone finds a solution
please help!
Am using
OS :Ubuntu
Rails: 4.1.8
Ruby :2.1.5p273
Webserver:
Hi Jaga,
take a llok to this tutorial https://www.youtube.com/watch?v=QJ8IRlRcFhI from
Mike Hibbert in his Ruby on Rails - Build your own ecommerce Engine tutorial.
He show how you can create and use a rails engine, I believe you will
understand how to search your catalog with it.
6 matches
Mail list logo