Geocoder is a Rails Gem which helps you to manipulate location in your Rails application. It is written by Alex Reisner. Thanks for his work and you can find out more details at Github – alexreisner / geocoder.
I have been working on Rails for more than half year and i do file editing with vi at server side most of the time. vi is a great tool but it is not convenient for editing multiple files which is very common in programmer. In the past, I had to close the file, cd to another directory and opened another file for editing. Continue reading NERDTree – The File Explorer in vi/vim→
I have created a delete link in the view to delete an object using link_to in Rails but whenever i click the link it goes to the :show method instead of prompting a Javascript alert box for delete confirmation. Here is the code in the view. Continue reading Rails – link_to :delete fails→
When running the test cases, most likely we need some mock data to test the functionality of our code. The factory_girl_rails gem is useful for creating mock data for testing purpose. Continue reading Rails – Create Mock Data for RSpec→
According to the documentation in the Devise home page, we can use the following before_filter to control the user access on specific controller functions.
before_filter :authenticate_user!
But when i try to test the controller function in RSpec, i got the following error.
Failure/Error: post :create
undefined method `authenticate!’ for nil:NilClass Continue reading Rails – RSpec Test with Devise→
By default, the users table in Devise only contains the email and password fields in user profile. Most likely we need to add our custom fields such that we can store more user information. The following steps show you how to add a username field in the users model. Continue reading Rails – Add Custom Fields to Devise User Model→