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
<%= form_for([@ticketable, @ticket]) do |f| %> |
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
class Role < ActiveRecord::Base | |
serialize :permissions | |
has_many :users | |
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
def list | |
#render :text =>"test" | |
current_user = User.find_by_login(params[:login]) | |
status = 1 | |
if !params[:status].nil? | |
status = params[:status].to_i | |
end | |
@tickets = Ticket.find(:all, :conditions => ["parent_id = 0 AND user_id = ? AND status = ?", current_user.id, status], :order => "id DESC") | |
@t = [] | |
for t in @tickets |
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
ruby-1.9.2-p0 > Geokit::Geocoders::MultiGeocoder.geocode('Stanford University') | |
=> Provider: google | |
Street: | |
City: Menlo Park | |
State: CA | |
Zip: | |
Latitude: 37.4327599 | |
Longitude: -122.1689284 | |
Country: US | |
Success: true |
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
<%= form_for(@comment, @code) do |f| %> | |
<%= f.hidden_field :commentable, :value => commentable.class.name %> | |
<%= f.hidden_field :commentable_id, :value => commentable.id %> | |
<%= f.label :content %><br /> | |
<%= f.text_area :content %><br /> | |
<%= f.fields_for @code do |c| %> | |
<div class="field"> | |
<%= c.select "file_type", SourceCode::FILE_TYPES %> | |
<%= c.label :source %><br /> | |
<%= c.text_area :source %> |
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
root@debian:/home/hearmeror# ls /usr/local/lib/ruby/gems/1.9.1/gems/ | |
abstract-1.0.0 activesupport-3.0.3 daemon_controller-0.2.5 file-tail-1.0.5 mysql2-0.2.6 rack-test-0.5.7 treetop-1.4.9 | |
actionmailer-3.0.3 arel-2.0.6 daemons-1.1.0 highlight-1.1.2 passenger-3.0.2 rails-3.0.3 tzinfo-0.3.23 | |
actionpack-3.0.3 bcrypt-ruby-2.1.2 devise-1.1.5 i18n-0.5.0 polyglot-0.3.1 railties-3.0.3 warden-1.0.2 | |
activemodel-3.0.3 bcrypt-ruby-2.1.3 erubis-2.6.6 mail-2.2.12 rack-1.2.1 spruz-0.2.2 warden-1.0.3 | |
activerecord-3.0.3 builder-2.1.2 eventmachine-0.12.10 mail-2.2.14 rack-mount-0.6.13 thin-1.2.7 | |
activeresource-3.0.3 bundler-1.0.3 fastthread-1.0.7 mime-types-1.16 rack-test-0.5.6 thor-0.14.6 | |
root@debian:/home/hearmeror# gem list | grep highlight | |
highlight (1.1.2) |
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
source 'http://rubygems.org' | |
gem 'rails', '3.0.3' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'mysql2' | |
gem 'devise' |
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
user hearmeror; | |
worker_processes 2; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
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
@range_days = RangeDay.where("user_id = ? AND rifle_id = ?", current_user.id, params[:rifle_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
def installer_files | |
render :layout => nil | |
file_name = params[:file] | |
#if file_name == 'core' | |
# render :text => File.open(RAILS_ROOT + "/agents/bar.py", "r").to_s | |
#elsif file_name == 'services' | |
# | |
#else | |
# render :text => 'foo' | |
#end |