Hunger
Thursday, 1 May 2014
How to handle routing errors and errors in general rails
http://techoctave.com/c7/posts/36-rails-3-0-rescue-from-routing-error-solution
Twitter Bootstrap modal rails delete button not working
http://stackoverflow.com/questions/12429066/twitter-bootstrap-modal-rails-delete-button-not-working?rq=1
Thursday, 20 March 2014
Rails migration
http://stackoverflow.com/questions/753919/run-a-single-migration-file
Thursday, 19 December 2013
Build a hash from an array
We need to build a hash, and we need to build it from each element in an array.
Old way
def visitors_name_email
result = {}
visitors.each do |visitor|
result[visitor.name] = visitor.email
end
result
end
New way
def visitors_name_email
visitors.inject({}) do |result, visitor|
result.merge(visitor.name => visitor.email)
end
end
Wednesday, 18 December 2013
How to Find Where Ruby Methods are Defined
https://coderwall.com/p/xuefia
Monday, 16 December 2013
Resque
Check in rails console
Resque.info
Wednesday, 27 November 2013
Rails Sunspot/Solr returning result for single character searches
http://www.steveroot.co.uk/2013/07/rails-sunspotsolr-returning-result-for-single-character-searches/
http://stackoverflow.com/questions/12088938/solrquery-does-not-returns-results-for-less-than-3-characters
Tuesday, 12 November 2013
Noty is a Jquery plugin that makes it easy to create alert, success, error, warning etc....
Noty
is a Jquery plugin that makes it easy to create alert, success, error, warning etc....
http://needim.github.io/noty/
Older Posts
Home
Subscribe to:
Posts (Atom)