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
{ | |
"section": [ | |
{ | |
"name": "help", | |
"sub-sections": [ | |
{ | |
"name": "about", | |
"place_holders": [ | |
{ | |
"name": "is it free?", |
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
<%= link_to_unless(true, "Search", root_path) do |name| %> | |
<% 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
class TranslationValue < ActiveRecord::Base | |
has_many :key_values | |
has_many :translation_keys, :through => :key_values | |
end | |
class TranslationKey < ActiveRecord::Base | |
has_many :key_values | |
has_many :translation_values, :through => :key_values | |
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
Processing TranslationValuesController#create (for 127.0.0.1 at 2010-05-03 19:07:03) [POST] | |
Parameters: {"commit"=>"Create", "translation_value"=>{"text"=>"value2", "translation_keys_attributes"=>{"0"=>{"name"=>"key2", "tag_list"=>""}}}, "authenticity_token"=>"J+dt/qHwHkbKygh0wBPnXPLtpkb3Pb8URxGucEbpLa0="} | |
Language Load (0.2ms) SELECT * FROM `languages` | |
Language Columns (0.6ms) SHOW FIELDS FROM `languages` | |
Language Load (0.0ms) SELECT * FROM `languages` WHERE (`languages`.`name` = 'English') LIMIT 1 | |
TranslationValue Columns (0.4ms) SHOW FIELDS FROM `translation_values` | |
TranslationValue Load (0.2ms) SELECT * FROM `translation_values` WHERE (`translation_values`.`text` = 'value2') LIMIT 1 | |
CACHE (0.0ms) SELECT * FROM `languages` WHERE (`languages`.`name` = 'English') LIMIT 1 | |
TranslationKey Columns (0.5ms) SHOW FIELDS FROM `translation_keys` | |
SQL (0.0ms) BEGIN |
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_tag( change_language_path("Spanish"), :method => :put ) do %> | |
<%= select_tag 'languages', options_from_collection_for_select(@languages, 'id', 'name') %> | |
<% 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
~/test> rake --trace | |
rake aborted! | |
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) | |
/home/oren/.rvm/gems/ruby-1.8.7-p72/gems/rake-0.8.7/lib/rake.rb:2377:in `raw_load_rakefile' | |
/home/oren/.rvm/gems/ruby-1.8.7-p72/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile' | |
/home/oren/.rvm/gems/ruby-1.8.7-p72/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' | |
/home/oren/.rvm/gems/ruby-1.8.7-p72/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile' | |
/home/oren/.rvm/gems/ruby-1.8.7-p72/gems/rake-0.8.7/lib/rake.rb:2000:in `run' | |
/home/oren/.rvm/gems/ruby-1.8.7-p72/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' | |
/home/oren/.rvm/gems/ruby-1.8.7-p72/gems/rake-0.8.7/lib/rake.rb:1998:in `run' |
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
how to open the Tag class? | |
class Tag < ActiveRecord::Base | |
def delete_taggings_of_client(client_id) | |
self.taggings.each do |t| | |
key = TranslationKey.find(t.taggable_id) | |
t.destroy if key.client_id == client_id | |
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
oren@oren-desktop:~$ rvm --trace ruby-1.8.7-p72 | |
--trace ruby-1.8.7-p72 | |
rvm 0.1.38 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/] | |
+ [[ -z '' ]] | |
+ [[ ! -z ruby-1.8.7-p72 ]] | |
+ rvm_action=use | |
+ [[ ! -z '' ]] | |
+ [[ ! -z '' ]] |
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
config.ru | |
--------- | |
require 'bundler' | |
Bundler.setup | |
require 'sinatra' | |
require 'main' | |
require 'rack/hoptoad' | |
require 'sequel' |
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
rackup -s mongrel -p 10001 -E qa -P /srv/cms_webservice/current/tmp/pids/mongrel.10001.pid /srv/cms_webservice/current/config/config.ru/srv/cms_webservice/releases/20100608014945/.bundle/environment.rb:206:in `chdir': No such file or directory - /home/oren/.rvm/gems/ruby-1.8.7-p72@global/specifications (Errno::ENOENT) | |
from /srv/cms_webservice/releases/20100608014945/.bundle/environment.rb:206 | |
from /srv/cms_webservice/releases/20100608014945/.bundle/environment.rb:181:in `map' | |
from /srv/cms_webservice/releases/20100608014945/.bundle/environment.rb:181 | |
from /home/capdeploy/.rvm/gems/ruby-1.8.7-p72@cms_webservice/gems/bundler-0.9.24/lib/bundler.rb:96:in `require' | |
from /home/capdeploy/.rvm/gems/ruby-1.8.7-p72@cms_webservice/gems/bundler-0.9.24/lib/bundler.rb:96:in `load' | |
from /home/capdeploy/.rvm/gems/ruby-1.8.7-p72@cms_webservice/gems/bundler-0.9.24/lib/bundler.rb:76:in `setup' | |
from /srv/cms_webservice/current/config/config.ru:2 | |
from /home/capdeplo |