Skip to content

Commit

Permalink
prefer before_action to before_filter
Browse files Browse the repository at this point in the history
before_filter  is not deprecated, but before_action is the Rails 4
convention
  • Loading branch information
acmetech committed Feb 13, 2014
1 parent c8d1d5a commit a2f5737
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/controllers/socializer/circles_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Socializer
class CirclesController < ApplicationController
before_filter :set_circle, only: [:show, :edit, :update, :destroy]
before_action :set_circle, only: [:show, :edit, :update, :destroy]

def index
@circles = current_user.circles
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/socializer/comments_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Socializer
class CommentsController < ApplicationController
before_filter :set_comment, only: [:edit, :update, :destroy]
before_action :set_comment, only: [:edit, :update, :destroy]

def new
@comment = Comment.new
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/socializer/groups_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Socializer
class GroupsController < ApplicationController
before_filter :set_group, only: [:edit, :update, :destroy]
before_action :set_group, only: [:edit, :update, :destroy]

def index
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/socializer/memberships_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Socializer
class MembershipsController < ApplicationController
before_filter :set_membership, only: [:approve, :confirm, :decline]
before_action :set_membership, only: [:approve, :confirm, :decline]

def create
@group = Group.find(params[:membership][:group_id])
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/socializer/notes_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Socializer
class NotesController < ApplicationController
before_filter :set_note, only: [:edit, :update, :destroy]
before_action :set_note, only: [:edit, :update, :destroy]

def new
@note = Note.new
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/socializer/people_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Socializer
class PeopleController < ApplicationController
before_filter :set_person, only: [:show, :likes, :message]
before_action :set_person, only: [:show, :likes, :message]

def index
@people = Person.all
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/socializer/person_addresses_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Socializer
class PersonAddressesController < ApplicationController
before_filter :set_person_address, only: [:update, :destroy]
before_action :set_person_address, only: [:update, :destroy]

def create
@person_address = current_user.adresses.build(params[:person_address])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Socializer
class PersonContributionsController < ApplicationController
before_filter :set_person_contribution, only: [:update, :destroy]
before_action :set_person_contribution, only: [:update, :destroy]

def create
@person_contribution = current_user.adresses.build(params[:person_contribution])
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/socializer/person_educations_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Socializer
class PersonEducationsController < ApplicationController
before_filter :set_person_education, only: [:update, :destroy]
before_action :set_person_education, only: [:update, :destroy]

def create
@person_education = current_user.adresses.build(params[:person_education])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Socializer
class PersonEmploymentsController < ApplicationController
before_filter :set_person_employment, only: [:update, :destroy]
before_action :set_person_employment, only: [:update, :destroy]

def create
@person_employment = current_user.adresses.build(params[:person_employment])
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/socializer/person_links_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Socializer
class PersonLinksController < ApplicationController
before_filter :set_person_link, only: [:update, :destroy]
before_action :set_person_link, only: [:update, :destroy]

def create
@person_link = current_user.adresses.build(params[:person_link])
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/socializer/person_phones_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Socializer
class PersonPhonesController < ApplicationController
before_filter :set_person_phone, only: [:update, :destroy]
before_action :set_person_phone, only: [:update, :destroy]

def create
@person_phone = current_user.adresses.build(params[:person_phone])
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/socializer/person_places_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Socializer
class PersonPlacesController < ApplicationController
before_filter :set_person_place, only: [:update, :destroy]
before_action :set_person_place, only: [:update, :destroy]

def create
@person_place = current_user.adresses.build(params[:person_place])
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/socializer/person_profiles_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Socializer
class PersonProfilesController < ApplicationController
before_filter :set_person_profile, only: [:update, :destroy]
before_action :set_person_profile, only: [:update, :destroy]

def create
@person_profile = current_user.adresses.build(params[:person_profile])
Expand Down

0 comments on commit a2f5737

Please sign in to comment.