Pages

Showing posts with label Ruby on Rails. Show all posts
Showing posts with label Ruby on Rails. Show all posts

Sunday, October 27, 2013

Removing Turbolinks from Rails 4

If you don't want to use Turbolinks with your Rails 4 application, it's easy! Just do this:

  1. Remove the gem 'turbolinks' line from your Gemfile.
  2. Run bundle install
  3. Remove the //= require turbolinks from your app/assets/javascripts/application.js
  4. Remove the two "data-turbolinks-track" => true hash key/value pairs from your app/views/layouts/application.html.erb

Done!

Reference: Removing Turbolinks from Rails 4

Tuesday, September 25, 2012

Rails 3 Routes [Solved]

Hi all am learning rails 3.2.8 and i found that in routes if i have a controller called User and i have 5 def a, def b,def c and def d. do i need to mention routes to each def because in 2.3.8 you no need to mention routes for each def but when i come to 3.2.8 i have to mention routes for each def in a controller like match

'user/new' => 'user#new'
match 'user/create' => 'user#create'

such way for each def in a controller. is there any other way to write a routes so that you no need to mention routes for each def.