This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".reason_content").autocomplete("/administration/reasons.js", { | |
width: 620, | |
max: 10, | |
highlight: false, | |
scroll: true, | |
scrollHeight: 300 | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h3>Reasons (<%= add_reason_link t(:action_add) %>)</h3> | |
<div id="reasons"> | |
<%= render :partial => 'reason', :collection => @report.reasons %> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Administration::ReportsHelper | |
def add_reason_link(name) | |
link_to_function name do |page| | |
page.insert_html :bottom, :reasons, :partial => 'reason', :object => Reason.new | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):001:0> ME = 5.freeze | |
=> 5 | |
irb(main):002:0> ME.frozen? | |
=> false | |
irb(main):003:0> ME = "5".freeze | |
(irb):3: warning: already initialized constant ME | |
=> "5" | |
irb(main):004:0> ME.frozen? | |
=> true | |
irb(main):005:0> |
NewerOlder