Module: Styx::Initializer

Extended by:
ActiveSupport::Concern
Defined in:
lib/styx/initializer.rb

Instance Method Summary collapse

Instance Method Details

#styx_initializeObject



14
15
16
17
18
19
20
21
22
# File 'lib/styx/initializer.rb', line 14

def styx_initialize()
  result = render_to_string :partial => 'styx/initializer', :locals => {
    :klass  => controller_path.gsub('/', '_').camelize,
    :method => action_name, 
    :data   => @styx_initialize_with
  }
  
  result.html_safe
end

#styx_initialize_with(data) ⇒ Object



10
11
12
# File 'lib/styx/initializer.rb', line 10

def styx_initialize_with(data)
  @styx_initialize_with.merge! data
end