How To Add A Route With A Forward Slash in Params with Rails 3 Application
Use an asterisk in the pattern to match for everything after it. In the example below, date will be available in the params hash as params[:date].
# params[:date] => "2007/1...
Install do_mysql Ruby Gem on Mac OS X
I ran into the same problem when installing mysql gem for Rails development. This fix worked for me http://seanbehan.com/programming/fixing-mysql-for-rails-2-2-development-on-mac-os-x/
The same thing works with the data objects gem. Just specify the path...
Active Admin Rails 5 undefined method per_page_kaminari
If you run into this error in development, using Rails 5 and Active Admin
NoMethodError - undefined method `per_page_kaminari'
Try the following.
First, make sure you have an initializer in your application.
# in config/initializers/kamina...
PHP Headers for Sending CSV File Downloads
If you would like to force a file download prompt to the user, instead of just outputting the text to the browser, use the following headers.
Change database column names for form validations in Rails
When you use validations in Rails, db column names are used as 'keys' for error messages. This is usually the preferred way to go about it because this maps nicely to the form fields. However, if you use a virtual attribute this may not be the case. For e...