@@ -9,9 +9,9 @@ class LinksController < ApplicationController
99 def index
1010 selected_tag = params [ :tag ]
1111 if selected_tag
12- @links = current_user_links . tagged_with ( selected_tag ) . order ( : created_at => :desc ) . paginate ( page : page )
12+ @links = current_user_links . tagged_with ( selected_tag ) . order ( created_at : :desc ) . paginate ( page : page )
1313 else
14- @links = current_user_links . order ( : created_at => :desc ) . paginate ( page : page )
14+ @links = current_user_links . order ( created_at : :desc ) . paginate ( page : page )
1515 end
1616 respond_to do |format |
1717 format . html
@@ -42,7 +42,7 @@ def new
4242
4343 def create
4444 @link = Link . new ( link_params . merge ( { user_id : current_user . id } ) . except! ( :tag_list ) )
45- current_user . tag ( @link , : with => link_params [ :tag_list ] , :on => :tags )
45+ current_user . tag ( @link , with : link_params [ :tag_list ] , on : :tags )
4646
4747 if @link . save
4848 redirect_to root_path
@@ -59,7 +59,7 @@ def edit
5959 def update
6060 if @link . present?
6161 @link . update ( link_params . merge ( { user_id : current_user . id } ) . except! ( :tag_list ) )
62- current_user . tag ( @link , : with => link_params [ :tag_list ] , :on => :tags )
62+ current_user . tag ( @link , with : link_params [ :tag_list ] , on : :tags )
6363 flash [ :success ] = 'Successfully Updated!!'
6464 redirect_to root_path
6565 else
@@ -76,7 +76,7 @@ def destroy
7676 end
7777
7878 def favourites
79- @links = current_user . links . where ( favourite : true ) . order ( : created_at => :desc ) . paginate ( page : page )
79+ @links = current_user . links . where ( favourite : true ) . order ( created_at : :desc ) . paginate ( page : page )
8080 render 'links/index'
8181 end
8282
@@ -93,7 +93,7 @@ def import
9393
9494 private
9595 def link_params
96- params . require ( :link ) . permit ( :title , :url , :learning_status_id , :description , :category_id , :user_id , :link_type_id , : tag_list => [ ] )
96+ params . require ( :link ) . permit ( :title , :url , :learning_status_id , :description , :category_id , :user_id , :link_type_id , tag_list : [ ] )
9797 end
9898
9999 def assign_link
0 commit comments