similar to: I think I've found a mistake in Rails tutorial

Displaying 20 results from an estimated 600 matches similar to: "I think I've found a mistake in Rails tutorial"

2013 Oct 24
6
undefined method `paginate' for #<Class:0x567eb98> in Rails Tutorial
Hi, I''m getting a undefined method `paginate'' for #<Class:0x567eb98> even though I have gem ''will_paginate'' installed. Inside the users_controller I have @users = User.paginate(page: params[:page ]) so I believe I set everything up to be correct. Can you figure out why the method''s undefined, despite installing the gem? -- You received this
2011 Jun 12
3
Problem with undefined variable current_user
Hi everyone, I''m working through the tutorial at the following link and attempting to customise/adapt the lessons for my own slightly different application. Link: Ruby on Rails Tutorial: Learn Rails by Example | Ruby on Rails 3 Tutorial book and screencasts | by Michael Hartl <http://ruby.railstutorial.org/ruby-on-rails-tutorial-book> I''m currently trying to work
2012 Nov 06
2
rspec failure upon revisit
I just returned from a different project after taking a few weeks off of my tutorial. I''m using Ruby on Rails 3 Tutorial - Learn Rails by Example by Michael Hartl. After rebooting my server I ran an rspec spec/ command to check to see if there were any problems and this is what I received. I didn''t modify anything except I did overwrite users_controller.rb and
2012 Jul 09
10
attr_accessible on some properties + attr_protected on others makes class 'open-by-default'
(I posted this as a bug in GitHub (https://github.com/rails/rails/issues/7018), but then someone there told me I should post it here, so here it is.) If you set attr_accessible on some properties in an ActiveRecord-descended class, and then attr_protected on others - the class becomes ''default-open'' - if any properties are missed or added later, they will be accessible by
2013 Feb 25
7
Optimistic Locking Enhancements: Gem or Core?
I''m working on an app that makes use of rails'' optimistic locking feature and seeing some possibilities for improvements. It seems a bit tedious to have to add :lock_version to forms wherever the model is used. You also have to "hack" around rails'' UJS feature to add it as a URL parameter when using remote: true, method: [:put, :patch, :post, :delete].
2012 Oct 03
1
Is there planned support for permitting params one at a time vs. all at once in strong_parameters/Rails 4?
Was going to have a variety of request params sent in and use a class_attribute that would define types of request parameters that are allowed. strong_parameters wouldn''t be too much trouble in such a case if it would allow me to manually permit some attributes (dynamically determined) in the controller but allow strong_parameters to enforce security of others. Is this something
2006 Apr 16
6
sorting
I need to sort users by their rank how do I do this? -- Posted via http://www.ruby-forum.com/.
2010 Jul 06
4
Simple routing problem
I''ve got the following in config\routes.rb: map.resources :users In app\views\shared\_menu.erb, I''ve got: Please sign in <%= link_to "here", :controller=>"user", :action=>"sign_in" -%> In app\controllers\users_controller.rb def sign_in end When I run the application, I crash with: Routing Error No route matches
2012 Jun 09
7
ActiveRecord::AssociationTypeMismatch in UsersController#update
Hi Im trying to link my User model to a Teams model. I seem to be getting the following errors. Any help would be great as Im just new to RoR Thanks error ActiveRecord::AssociationTypeMismatch in UsersController#update Team(#2183395560) expected, got String(#2174675960) app/controllers/users_controller.rb:67:in `update'' app/controllers/users_controller.rb:66:in `update''
2006 Apr 10
3
Problems with multiple ActiveRecords and Validations
Hi all, I am a RoR newbie and have the following scenario set up: There are 2 ActiveRecords involved, the first one being "User", the second one being "Visibility". The corresponding users table holds address informations regarding a User. The visibilities table holds visibility settings for the individual columns of the users table (i.e. firstname, lastname, country
2009 Jan 26
5
Please help with a routing problem
Hi All I''m having some issues with the following routes problem. The routes.rb file ... map.resources :users map.connect ''/users/view_payments/:user_id'', :controller => ''users'', :action => ''view_payments'' The users_controller.rb file ... def view_payments @user = User.find[:params[:user_id]] @payments =
2013 May 04
21
Getting started w/ Rails 4
Hi. I''m trying to run Getting started tutorial under Rails 4.0.0.beta1 although it assumes it runs on Rails 3. I was able to get rid of all errors by wrapping post_params here and there, and installing protected_attributes Gem for attr_accessible to make sense. Post/ comment CRUD works just fine, but I don''t seem to be able to add Tags (the final part of the tutorial). Post saved
2010 Dec 29
5
Beginer: Question about routing on Rails 3
I bought this book about rails for beginers (head first Rails) and its quite simple and good for someone who has no clue about Rails (or any other language) On chapter two it talks about routing but unfortunately the book is for rails 2 and i have rails 3 installed on my mac. The line i have to enter in the config/routes.rb of my application is: map.connect ''/ads/:id'',
2013 Oct 21
8
git push not working
<https://lh4.googleusercontent.com/-IA0TutFw54A/UmVnJwi7CHI/AAAAAAAAAzg/fEZFf_kHsug/s1600/git.gif> Hi again, I''m working on http://ruby.railstutorial.org section http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-git_push I''m trying to push the repository to the remote site but what ever I fials. I''ve updated, removed the s of the https etc but still
2011 May 17
1
rails render_to_string problem
Hi I`m trying to test my controller with rspec and always get an error. The error is in the render_to_string method call (without it test works fine). So could u please help me with that? users_controller.rb: def update @user.update_attributes!(params[:user]) redirect_to @user, :status => 202, :text => render_to_string(:partial => "users/show", :type =>
2011 May 08
1
Spork + Autotest Failure
Hi folks, I''m going through railstutorial.org and so I apologize if I''m hitting the wrong group here and would appreciate any appropriate redirection if necessary. I''ve set up Spork + Autotest as per Michael''s instructions in http://ruby.railstutorial.org/chapters/static-pages#sec:testing_tools Essentially by doing the following (using rvm & I''m
2010 Aug 10
2
undefined method `has_many' for Object:Class +Savage Beast 2.3 plugin
Hi, i am using Savage Beast 2.3 plugin for the forum and i got and error undefined method `has_many'' for Object:Class C:/forum/vendor/plugins/savage-beast/lib/savage_beast/user_init.rb: 9:in `included'' C:/forum/vendor/plugins/savage-beast/lib/savage_beast/user_init.rb: 7:in `class_eval'' C:/forum/vendor/plugins/savage-beast/lib/savage_beast/user_init.rb: 7:in
2010 Dec 11
3
Why doesn't Heroku show the Rails default page?
Following chapter (1) of the Ruby on Rails tutorial: http://railstutorial.org/, I was able to successfuly push the application to "Heroku" using: > git push heroku master But, when I open the website, I get a page with the following: App crashed This application is temporarily offline. If you''re the administrator of this app, please check your heroku logs for the backtrace.
2012 Jul 26
2
Develop resources within namespace
Hi, I want to develop my resources that deal with CRUD operations on my models in a namespace of /admin. How is the best approach to do this? What needs to be changed in order to do this? As in my last attempt of moving things to a namespace my software broke. TIA, Dean -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To
2010 Oct 20
3
rspec error's when checking LayoutLinks from the railstutorials
I am following the rails tutorial: http://railstutorial.org/chapters/filling-in-the-layout#top Basically the test is something like: spec/requests/layout_links_spec.rb require ''spec_helper'' describe "LayoutLinks" do it "should have a Home page at ''/''" do get ''/'' response.should