Ruby on Rails Discussions
passing a parameter only if not blank
rubyonrails-talk
Bob_Showalter
(Bob Showalter)
November 6, 2007, 5:33pm
1
nil params aren't passed, so you could do:
:manager =>
@manager.blank
? ? nil :
@manager
Related topics
Topic
Replies
Views
Activity
Is there a better way of doing this? checking for params
rubyonrails-talk
0
203
October 25, 2006
testing for non-existent parameters with "if"
rubyonrails-talk
0
116
March 4, 2007
testing for non-existent parameters with "if"
rubyonrails-talk
0
143
March 4, 2007
testing for non-existent parameters with "if"
rubyonrails-talk
0
119
March 4, 2007
Check what is comming in param
rubyonrails-talk
2
237
August 26, 2009