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 "/users" for 71.174.139.102 at 2011-09-16 07:16:06 +0400 | |
Processing by UsersController#index as HTML | |
Completed 500 Internal Server Error in 2ms | |
ActiveRecord::StatementInvalid (Mysql2::Error: Table 'kdot.users' doesn't exist: SHOW FIELDS FROM `users`): | |
app/controllers/users_controller.rb:5:in `index' | |
Started GET "/users" for 71.174.139.102 at 2011-09-16 07:19:47 +0400 |
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 "/users" for 71.174.139.102 at 2011-09-16 07:22:11 +0400 | |
Processing by UsersController#index as HTML | |
Completed 500 Internal Server Error in 1ms | |
ActiveRecord::StatementInvalid (Mysql2::Error: Table 'kdot.users' doesn't exist: SHOW FIELDS FROM `users`): | |
app/controllers/users_controller.rb:5:in `index' | |
Migrating to CreateUsers (20110915234605) | |
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
Command: | |
User.joins(:tags).select("users.email, tags.tag_name") | |
SQL: | |
SELECT users.email, tags.tag_name FROM `users` INNER JOIN `notecards` ON `notecards`.`user_id` = `users`.`id` INNER JOIN `associations` ON `associations`.`notecard_id` = `notecards`.`id` INNER JOIN `tags` ON `tags`.`id` = `associations`.`tag_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
ruby-1.9.2-p290 :214 > User.joins(:tags).select("users.email, tags.tag_name as tag_name") | |
User Load (1.3ms) SELECT users.email, tags.tag_name as tag_name FROM `users` INNER JOIN `notecards` ON `notecards`.`user_id` = `users`.`id` INNER JOIN `associations` ON `associations`.`notecard_id` = `notecards`.`id` INNER JOIN `tags` ON `tags`.`id` = `associations`.`tag_id` | |
=> [#<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "incorvia@gmail.com">, #<User email: "inco |
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
resources :users do | |
resources :tags | |
end | |
============================================= | |
this works: tag_name is passed as a paramater {"tag_name"=>"@books"} | |
============================================== | |
match '/tags/:tag_name', :to => "tags#show" |
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
== Install | |
Add to gemfile: | |
gem 'compass', '~> 0.12.alpha' | |
Initialize compass with the rails project by moving into directory and running: | |
compass init rails --using blueprint |
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
Failures: | |
1) PagesController Title should have the correct title | |
Failure/Error: response.should have_selector('title'){ |tag| tag.inner_text.should == "Body Harmony | About Us" } | |
expected css "title" to return something | |
# ./spec/controllers/pages_controller_spec.rb:47:in `block (3 levels) in <top (required)>' | |
Finished in 0.33725 seconds | |
8 examples, 1 failure |
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
/Users/Kevin/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -rrubygems -S /Users/Kevin/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.6.4/bin/rspec --tty '/Users/Kevin/Documents/Code/Rails/work/BodyHarmony/spec/controllers/pages_controller_spec.rb' | |
/Users/Kevin/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_ | |
.......F | |
Failures: | |
1) PagesController Title should have the correct title | |
Failure/Error: response.should have_selector('title'){ |tag| tag.inner_text.should == "Body Harmony | About Us" } | |
expected css "title" to return something | |
# ./spec/controllers/pages_controller_spec.rb:47:in `block (3 levels) in <top (required)>' |
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
/Users/Kevin/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -rrubygems -S /Users/Kevin/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.6.4/bin/rspec --tty '/Users/Kevin/Documents/Code/Rails/work/BodyHarmony/spec/controllers/pages_controller_spec.rb' | |
/Users/Kevin/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_ | |
.......F | |
Failures: | |
1) PagesController Title should have the correct title |
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
Models | |
User | |
has_many :friendships | |
has_many :friends, :through => friendships | |
has_many :invites | |
has_many :events :through => invites | |
Friendship |
OlderNewer