This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
This file contains hidden or 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 "dis" | |
| runtime = Dis::Runtime.new(:development) do | |
| database "mysql://root:@localhost/dis_development" | |
| base_url "http://localhost:9292/" | |
| # subscribe_uri "http://localhost:1265/subscribe" | |
| # publish_uri "http://localhost:1321/publish" | |
| log :level => :debug | |
| end |
This file contains hidden or 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 import_contacts(data, params) | |
| if data['token'] and !data['token'].blank? | |
| token = data['token'] | |
| imported = Cache.get("imported_#{current_user.uid}_#{data['token']}") | |
| return nil unless imported | |
| else | |
| service_name = data['service'] | |
| hash = validate(data) do | |
| required(:service, :login, :password) | |
| test("Service can't be blank", :service) do |val| |
This file contains hidden or 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
| //working | |
| $('.retweet-button').html('<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>'); | |
| //not working | |
| var fbshare = $.getScript('http://widgets.fbshare.me/files/fbshare.js', function() { | |
| $('.facebook-button').html(fbshare); | |
| }); | |
This file contains hidden or 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
| view : | |
| <%= render "missing_content" %> | |
| _missing_content.html.erb : | |
| <% if @missing_content %> | |
| <h2> The following keys has no content on environment :</h2> | |
| <% @missing_content.each do |language| %> |