Skip to content

Commit

Permalink
Make use of the inherited initializer.
Browse files Browse the repository at this point in the history
  • Loading branch information
thedarkone authored and fxn committed Aug 13, 2011
1 parent 37b30d4 commit a53ef97
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions actionpack/lib/action_dispatch/routing/mapper.rb
Expand Up @@ -936,12 +936,11 @@ class SingletonResource < Resource #:nodoc:
DEFAULT_ACTIONS = [:show, :create, :update, :destroy, :new, :edit]

def initialize(entities, options)
super

@as = nil
@name = entities.to_s
@path = (options[:path] || @name).to_s
@controller = (options[:controller] || plural).to_s
@as = options[:as]
@options = options
end

def plural
Expand Down

0 comments on commit a53ef97

Please sign in to comment.