lib/auth_bookmark.rb
#Renders the javascript file that will get open the popup
#This is the action called by the bookmarklet. Make whatever modifications
# to the script file.
Renders the javascript file that will get open the popup
This is the action called by the bookmarklet. Make whatever modifications
to the script file.
Renders the javascript file that will get open the popup This is the action called by the bookmarklet . Make whatever modifications to the script file .
def script
    script_file = File.new("#{RAILS_ROOT}/public/javascripts/#{self.class.to_s.chomp("Controller").downcase}_bookmarker.js", 'r')
    @script_file_contents = script_file.read.gsub( '%H%', request.env['HTTP_HOST'].to_s )
    script_file.close
    render :text => @script_file_contents
  end
def script script_file = File . new ( "#{RAILS_ROOT}/public/javascripts/#{self.class.to_s.chomp("Controller").downcase}_bookmarker.js" , 'r' ) @script_file_contents = script_file . read . gsub ( '%H%' , request . env [ 'HTTP_HOST' ] . to_s ) script_file . close render :text => @script_file_contents end
Renders the javascript file that will get open the popup
This is the action called by the bookmarklet.
Renders the javascript file that will get open the popup This is the action called by the bookmarklet .
#Grab the file #Add our current working http location, so we don't have to worry about setting a variable