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
#encoding: utf-8 | |
class ShowsController < ApplicationController | |
def index | |
@shows = Show.all | |
end | |
def show | |
@show = Show.find(params[: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
rvm 1.14.7 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] | |
[Thu, 26 Jul 2012 17:28:17 +0200] INFO: bash[RVM Multi-User installing] ran successfully | |
[Thu, 26 Jul 2012 17:28:17 +0200] INFO: Processing bash[Updating rvm] action run (install_rvm_with_ruby_stable::default line 17) | |
RVM reloaded! | |
[Thu, 26 Jul 2012 17:28:18 +0200] INFO: bash[Updating rvm] ran successfully | |
[Thu, 26 Jul 2012 17:28:18 +0200] INFO: Processing bash[Installing 1.8.7] action run (install_rvm_with_ruby_stable::default line 23) | |
Already installed ruby-1.8.7-p370. | |
To reinstall use: |
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
node['packages'].each do |package_name| | |
package package_name | |
end | |
bash "RVM Multi-User installing" do | |
code "sudo curl -L https://get.rvm.io | sudo bash -s stable" | |
end | |
bash "Updating rvm" do | |
code "#{node['rvm_bin']} get head" |
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
node['packages'].each do |package_name| | |
package package_name | |
end | |
bash "RVM Multi-User installing" do | |
code "sudo curl -L https://get.rvm.io | sudo bash -s stable" | |
end | |
bash "Updating rvm" do | |
code "#{node['rvm_bin']} get head" |
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 'bundler/capistrano' | |
server '5.9.59.102', :web, :app, :db, primary: true | |
set :deploy_via, :remote_cache | |
set :scm, :git | |
set :repository, 'git://github.com/valachi/mystore.git' | |
set :deploy_to, '~' | |
set :user, 'mystore' | |
set :use_sudo, :false |
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
aLoading development environment (Rails 3.2.8) | |
1.9.3p194 :001 > art = Art.first | |
Art Load (0.4ms) SELECT `arts`.* FROM `arts` LIMIT 1 | |
=> #<Art id: 3, image: "06_wallpaper.jpg", title: "Клипарт", desc: "Недорогой клипарт от nicegirls", created_at: "2012-09-26 07:38:12", updated_at: "2012-09-26 07:38:12"> | |
1.9.3p194 :002 > helper.image_tag art.image | |
=> "<img alt=\"06_wallpaper\" src=\"/uploads/art/image/3/06_wallpaper.jpg\" />" | |
1.9.3p194 :003 > helper.image_tag art.image.url | |
=> "<img alt=\"06_wallpaper\" src=\"/uploads/art/image/3/06_wallpaper.jpg\" />" | |
1.9.3p194 :004 > helper.image_tag art.image.thumb | |
=> "<img alt=\"Thumb_06_wallpaper\" src=\"/uploads/art/image/3/thumb_06_wallpaper.jpg\" />" |
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
$ -> | |
return unless $('#uploads').length | |
queue = do -> | |
data = [] | |
current = 0 | |
uploading = false | |
{ | |
add: (item) -> |
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
$ -> | |
return unless $('#uploads').length | |
queue = do -> | |
data = [] | |
current = 0 | |
uploading = false | |
{ | |
add: (item) -> |
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 Category < ActiveRecord::Base | |
validates :name, presence: true, :uniqueness => true | |
has_many :articles | |
end | |
cLoading development environment (Rails 3.2.8) |
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
Started GET "/out.php?link=http://webcastacademy.com/user/profile.php?id=999" for 108.178.58.205 at 2012-10-08 16:04:21 +0200 | |
ActionController::RoutingError (No route matches [GET] "/out.php"): | |
actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' | |
actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' | |
railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app' | |
railties (3.2.8) lib/rails/rack/logger.rb:16:in `call' | |
actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call' | |
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call' | |
rack (1.4.1) lib/rack/runtime.rb:17:in `call' |
OlderNewer