Class: Footnotes::Notes::RpmNote

Inherits:
AbstractNote show all
Defined in:
lib/rails-footnotes/notes/rpm_note.rb

Instance Method Summary collapse

Methods inherited from AbstractNote

close!, #has_fieldset?, included?, #javascript, #legend, #onclick, start!, #stylesheet, #title, title, #to_sym, to_sym

Constructor Details

#initialize(controller) ⇒ RpmNote

Returns a new instance of RpmNote.



6
7
8
# File 'lib/rails-footnotes/notes/rpm_note.rb', line 6

def initialize(controller)
  @rpm_id=NewRelic::Agent.instance.transaction_sampler.current_sample_id
end

Instance Method Details



14
15
16
17
# File 'lib/rails-footnotes/notes/rpm_note.rb', line 14

def link
   #{:controller => 'newrelic', :action => 'show_sample_detail', :id => @rpm_id}
   "/newrelic/show_sample_detail/#{@rpm_id}"
end

#rowObject



10
11
12
# File 'lib/rails-footnotes/notes/rpm_note.rb', line 10

def row
  :edit
end

#valid?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/rails-footnotes/notes/rpm_note.rb', line 19

def valid?
  !NewRelic::Config.instance['skip_developer_route']
end