Module: ActsAsDashboard::InstanceMethods
- Defined in:
- lib/acts_as_dashboard/instance_methods.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/acts_as_dashboard/instance_methods.rb', line 3 def show @json_widgets = dashboard_config..map {|w| w.attributes}.to_json @dashboard_path = "#{ApplicationController.relative_url_root}/" + self.class.to_s.underscore.sub('_controller', '').singularize + '/widgets/' # @dashboard_css_path = File.join(File.dirname(__FILE__), 'public', 'stylesheets', 'dashboard.css') # @dashboard_css = File.open(@dashboard_css_path).read # # @dashboard_js_path = File.join(File.dirname(__FILE__), 'public', 'javascripts', 'dashboard.js') # @dashboard_js = File.open(@dashboard_js_path).read # render :file => File.join(File.dirname(__FILE__), 'app', 'views', 'dashboards', 'show.html.erb') end |