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
@quoteitem=Quoteitem.all(:conditions=>['id=?',session[:quoteitem]] ) | |
@memberitem_id = @quoteitem.update_attributes(:memberitem_id=>@members.id) |
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
respond_to do |format| | |
format.pdf | |
Emailer.deliver_welcome(@selection_id,@members) | |
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
#!/usr/local/bin/ruby | |
require 'uri' | |
require 'net/http' | |
require 'open-uri' | |
uri=URI.parse('http://www.google.ca/') | |
test=Net::HTTP.post_form(uri, | |
{"q"=>"MYLONGSEARCH"}) |
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
@members=Member.all(params[:memberitem]) | |
if @members.update_attributes(params[:member]) | |
format.html{redirect_to :action=>"show", :quoteitem=>session[:quoteitem], :memberitem=>session[:memberitem], :ro=>"0"} | |
else | |
format.html{redirect_to :action=>"edit", :quoteitem=>session[:quoteitem], :memberitem=>session[:memberitem]} | |
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
<%= select_tag "member[program]", | |
option_groups_from_collection_for_select(@programs, :programsubtypes, :name, :id, :name, nil),html_options = {:size=>"0"} %> |
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
[ pid=17208 file=Hooks.cpp:516 time=2009-09-01 11:01:12.718 ]: | |
Backend process 17971 did not return a valid HTTP response. It returned: [Status] | |
*** Exception NoMethodError in application (You have a nil object when you didn't expect it! | |
You might have expected an instance of ActiveRecord::Base. | |
The error occurred while evaluating nil.[]=) (process 17971): | |
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/rack/request_handler.rb:68:in `process_request' | |
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/abstract_request_handler.rb:197:in `main_loop' | |
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/railz/application_spawner.rb:340:in `start_request_handler' | |
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/railz/application_spawner.rb:298:in `handle_spawn_application' | |
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.1.3/lib/phusion_passenger/utils.rb:176:in `saf |
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
#!/usr/bin/ruby | |
require 'uri' | |
require 'net/http' | |
require 'open-uri' | |
require 'rubygems' | |
require 'nokogiri' | |
require 'mechanize' |
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
require 'uri' | |
require 'net/http' | |
require 'open-uri' | |
require 'rubygems' | |
require 'nokogiri' | |
require 'optparse' | |
require 'mechanize' | |
a = WWW::Mechanize.new { |agent| | |
agent.user_agent_alias = 'Mac Safari' |
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
redirect to https for login pages only | |
#Redirect HTTPS to HTTP | |
Options +FollowSymlinks | |
RewriteCond %{SERVER_PORT} ^443$ | |
#select any url excluding the one containing login | |
RewriteRule (?!login\b)\b\w+\W+ http://%{HTTP_HOST}%{REQUEST_URI} [R,L] | |
#Redirect HTTP to HTTPS | |
Options +FollowSymlinks |
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
gem install mysql -- --with-mysql-config=/usr/bin/mysql_config | |
Building native extensions. This could take a while... | |
Successfully installed mysql-2.8.1 | |
1 gem installed | |
Installing ri documentation for mysql-2.8.1... | |
No definition for next_result | |
No definition for field_name |
OlderNewer