Module: Ixtlan::Core::Singleton
- Defined in:
- lib/ixtlan/core/railtie.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/ixtlan/core/railtie.rb', line 13 def self.included(base) base.class_eval do class_option :singleton, :type => :boolean, :default => false if self.class.to_s =~ /ScaffoldGenerator$/ protected alias :available_views_old :available_views def available_views if [:singleton] %w(edit show _form) else available_views_old end end end end end |