[Rails] undefined method `addresses' for #

2020-02-02 Thread fugee ohu
world_controller.rb @users = User.search(params[:terms]).where("confirmed_at is not null") search.html.erb <%= (t 'search_results_for') %> <%= @terms %> <% @users.each do |u| %> <%= link_to "#{u.first_name} #{u.middle_name} #{u.last_name}", page_path(name: u.name) %> <% ua

Re: [Rails] undefined method '<<' for polymorphic association

2019-09-09 Thread Ariel Juodziukynas
You can do @item.pictures << @picture El mar., 10 sep. 2019 01:02, fugee ohu escribió: > class Item < ApplicationRecord > has_many :pictures, as: :imageable > end > > class Picture < ApplicationRecord > belongs_to :imageable, polymorphic: true, optional: true > end > > NoMethodError in Picture

[Rails] undefined method '<<' for polymorphic association

2019-09-09 Thread fugee ohu
class Item < ApplicationRecord has_many :pictures, as: :imageable end class Picture < ApplicationRecord belongs_to :imageable, polymorphic: true, optional: true end NoMethodError in PicturesController#create undefined method `<<' for # @item.pictures.create << @picture -- You received this

Re: [Rails] undefined method `user_id' for nil:NilClass | Devise and Rails 4

2016-05-19 Thread Deepak Sharma
On Fri, May 20, 2016 at 2:40 AM, Colin Law wrote: > > Note that here you have put @student.user_id > Also note that her you have said student.user_id (no '@') > In the code you posted initially it is @student, which is nil as you > have not assigned a value to it. Yes, I tried to different app

Re: [Rails] undefined method `user_id' for nil:NilClass | Devise and Rails 4

2016-05-19 Thread Colin Law
On 19 May 2016 at 21:58, Deepak Sharma wrote: > > On Fri, May 20, 2016 at 1:50 AM, Colin Law wrote: >> >> >> Initially what you are doing wrong is not posting the full error >> message and not telling us which line of code the error refers to. >> The error means that you have tried to call someth

Re: [Rails] undefined method `user_id' for nil:NilClass | Devise and Rails 4

2016-05-19 Thread Deepak Sharma
On Fri, May 20, 2016 at 1:50 AM, Colin Law wrote: > > > Initially what you are doing wrong is not posting the full error > message and not telling us which line of code the error refers to. > The error means that you have tried to call something.user_id but the > value of 'something' is nil. Look

Re: [Rails] undefined method `user_id' for nil:NilClass | Devise and Rails 4

2016-05-19 Thread Colin Law
On 19 May 2016 at 18:52, Deepak Sharma wrote: > In my application I want only current user to edit and delete his/her stuff > and for others stuff he just able to show it. I'm using devise with rails 4. > ... > > With all that configuration I'm getting following error undefined method > `user_id

[Rails] undefined method `user_id' for nil:NilClass | Devise and Rails 4

2016-05-19 Thread Deepak Sharma
In my application I want only current user to edit and delete his/her stuff and for others stuff he just able to show it. I'm using devise with rails 4. Here my files. *Migration* rails g migration AddUserIdToStudents user:references *user.rb* class User < ActiveRecord::Base has_many :studen

Re: [Rails] undefined method `build_

2016-01-02 Thread fugee ohu
On Saturday, January 2, 2016 at 7:38:13 PM UTC-5, James Jelinek wrote: > > If a user has many schools you would want > > current_user.schools.new(school_params) > > Unfortunately I don't know how your associations are setup so I'm taking a > guess at this. 👍🏻 > > On Jan 2, 2016, at 6:32 PM, fugee

Re: [Rails] undefined method `build_

2016-01-02 Thread fugee ohu
that's a reference to the new action, i'm asking about the create action where create_association is used, not build_association On Saturday, January 2, 2016 at 7:38:13 PM UTC-5, James Jelinek wrote: > > If a user has many schools you would want > > current_user.schools.new(school_params) > > Unf

Re: [Rails] undefined method `build_

2016-01-02 Thread fugee ohu
On Saturday, January 2, 2016 at 7:38:13 PM UTC-5, James Jelinek wrote: > > If a user has many schools you would want > > current_user.schools.new(school_params) > > Unfortunately I don't know how your associations are setup so I'm taking a > guess at this. 👍🏻 > > On Jan 2, 2016, at 6:32 PM, fugee

Re: [Rails] undefined method `build_

2016-01-02 Thread fugee ohu
On Saturday, January 2, 2016 at 7:38:13 PM UTC-5, James Jelinek wrote: > > If a user has many schools you would want > > current_user.schools.new(school_params) > > Unfortunately I don't know how your associations are setup so I'm taking a > guess at this. 👍🏻 > > On Jan 2, 2016, at 6:32 PM, fugee

Re: [Rails] undefined method `build_

2016-01-02 Thread jelinek
If a user has many schools you would want current_user.schools.new(school_params) Unfortunately I don't know how your associations are setup so I'm taking a guess at this. 👍🏻 > On Jan 2, 2016, at 6:32 PM, fugee ohu wrote: > > what should the create action be > @school = current_user.crea

Re: [Rails] undefined method `build_

2016-01-02 Thread fugee ohu
what should the create action be @school = current_user.create_school(school_params) On Saturday, January 2, 2016 at 4:45:20 PM UTC-5, Colin Law wrote: > > On 2 January 2016 at 20:51, fugee ohu > > wrote: > > def create > > @school = current_user.build_school(school_params) > > >

Re: [Rails] undefined method `build_

2016-01-02 Thread fugee ohu
what should the create action be? i tried @school = current_user.build_school(school_params) On Saturday, January 2, 2016 at 4:45:20 PM UTC-5, Colin Law wrote: > > On 2 January 2016 at 20:51, fugee ohu > > wrote: > > def create > > @school = current_user.build_school(school_params)

Re: [Rails] undefined method `build_

2016-01-02 Thread fugee ohu
Sorry Colin I fell asleep Here's how I worked it out <%= form_for(@school) do |school_form| %> <% school_form.fields_for :profiles do |f| %> On Saturday, January 2, 2016 at 4:45:20 PM UTC-5, Colin Law wrote: > > On 2 January 2016 at 20:51, fugee ohu > > wrote: > > def create > > @school

Re: [Rails] undefined method `build_

2016-01-02 Thread jelinek
No, you've mentioned top posting and your dislike of it countless times. 🌶 > On Jan 2, 2016, at 4:38 PM, Colin Law wrote: > >> On 2 January 2016 at 22:21, wrote: >> Why not kindly pointing out the error and offer a suggestion to assist the >> OP instead? > > Because one learns more by workin

Re: [Rails] undefined method `build_

2016-01-02 Thread Colin Law
On 2 January 2016 at 22:21, wrote: > Why not kindly pointing out the error and offer a suggestion to assist the OP > instead? Because one learns more by working out the error for oneself. If the OP goes and looks at the documentation that he thought said that he should be able to do this then

Re: [Rails] undefined method `build_

2016-01-02 Thread jelinek
Why not kindly pointing out the error and offer a suggestion to assist the OP instead? Yes. I'm top posting. > On Jan 2, 2016, at 3:44 PM, Colin Law wrote: > >> On 2 January 2016 at 20:51, fugee ohu wrote: >> def create >>@school = current_user.build_school(school_params) >> >> causes

Re: [Rails] undefined method `build_

2016-01-02 Thread Colin Law
On 2 January 2016 at 20:51, fugee ohu wrote: > def create > @school = current_user.build_school(school_params) > > causes the above error my models are users has_one profile, profile has_many > schools, profile belongs_to user, school belongs_to profile What makes you think that current_use

[Rails] undefined method `build_

2016-01-02 Thread fugee ohu
def create @school = current_user.build_school(school_params) causes the above error my models are users has_one profile, profile has_many schools, profile belongs_to user, school belongs_to profile -- You received this message because you are subscribed to the Google Groups "Ruby on Rai

Re: [Rails] undefined method `name' for nil:NilClass

2015-06-29 Thread Colin Law
On 29 June 2015 at 18:54, William de Lima wrote: > .. > ActionView::Template::Error (undefined method `name' for nil:NilClass): > 9: .pull-right > 10: = submit_tag t('news.comment'), class: 'btn btn-primary' > 11: .clearfix > 12: - unless @item.comments.any? > 13: #comment-comp

[Rails] undefined method `name' for nil:NilClass

2015-06-29 Thread William de Lima
Hi, i'm pretty new to the Rail and Ruby and today I have a problem that I have to solve (tl;dr: the expert ruby/rails has left our company and now the newbies like me have to work on the projects that he left). So, let's go straight: I have an app running "normally", login function OK, but then

Re: [Rails] undefined method

2015-04-02 Thread Colin Law
On 2 April 2015 at 16:50, Rails_beginner wrote: > hi, > > I am trying to make use of a method located in my model (see below) directly > at my view but I am getting undefined method. how can solve this ? > > app/model/operation.rb > > def all_products_have_same_posters_count? > products.all?

[Rails] undefined method

2015-04-02 Thread Rails_beginner
hi, I am trying to make use of a method located in my model (see below) directly at my view but I am getting undefined method. how can solve this ? *app/model/operation.rb* d*ef all_products_have_same_posters_count?* *products.all? { |p| p.posters.count == products.first.posters.count }* *

Re: [Rails] (undefined method `each' for nil:NilClass) while doing Getting started tutorial

2015-03-26 Thread Colin Law
On 25 March 2015 at 22:12, Med Potter wrote: > I followed every line of the tutorial > > but I get this error > > Showing /home/ubuntu/blog/app/views/articles/index.html.erb where line #9 > raised: > undefined method `each' for nil:NilClass > > <% @articles.each do |article| %> > > <%

Re: [Rails] (undefined method `each' for nil:NilClass) while doing Getting started tutorial

2015-03-26 Thread Vivek Sampara
2 Possibilities. 1. Did you run your migrations 2. Did you restart your server after that ? On Thu, Mar 26, 2015 at 3:42 AM, Med Potter wrote: > I followed every line of the tutorial > > but I get this error > > Showing /home/ubuntu/blog/app/views/articles/index.html.erb where line #9 > raised:

[Rails] (undefined method `each' for nil:NilClass) while doing Getting started tutorial

2015-03-25 Thread Med Potter
I followed every line of the tutorial but I get this error Showing /home/ubuntu/blog/app/views/articles/index.html.erb where line #9 raised: undefined method `each' for nil:NilClass <% @articles.each do |article| %> <%= article.title %> <%= article.text %> if you think tha

Re: [Rails] undefined method `devise' for User(no database connection):Class

2015-01-14 Thread Rafi A
Hi Colin, Thanks. Now its working. I have used connection_ninja gem for connecting more that one database in my application. After correcting the environment configurations in proper sequence in yml file, everything started to working.. Regards, Seeni Rafiyullah Khan A, *In Every moment, thank G

Re: [Rails] undefined method `devise' for User(no database connection):Class

2015-01-14 Thread Colin Law
On 14 January 2015 at 10:01, Rafi A wrote: > Hi All, > > I am getting the error mentioned in SUBJECT while fetching the user model. I > am using three different database in my application. Can I use devise gem > for authentication user table in different database? Did you run rails generate devis

[Rails] undefined method `devise' for User(no database connection):Class

2015-01-14 Thread Rafi A
Hi All, I am getting the error mentioned in SUBJECT while fetching the user model. I am using three different database in my application. Can I use devise gem for authentication user table in different database? Regards, Seeni Rafiyullah Khan A, *In Every moment, thank God.* -- You received thi

Re: [Rails] undefined method `symbolize_keys' for

2014-11-10 Thread Rob Biedenharn
On 2014-Nov-10, at 16:17 , Dave Castellano wrote: > Dave Aronson wrote in post #1162130: >> >> >> Try fixing the "src=" bit. That's HTML, not Ruby. >> > <%= link_to(image_tag asset_path("#{subject.icon}" + '.png'), > index_books_path(:subject_id => subject.id)) %> still throws same error.

Re: [Rails] undefined method `symbolize_keys' for

2014-11-10 Thread Dave Aronson
On Monday, November 10, 2014, Dave Castellano wrote: I am getting the error: > undefined method `symbolize_keys' for "/contents/index_books/13":String > > for the following: > > <%= link_to(image_tag src= asset_path("#{subject.icon}" + '.png'), > index_books_path(:subject_id => subject.id)) %>

[Rails] undefined method `symbolize_keys' for

2014-11-10 Thread Dave Castellano
Hi, I am getting the error: undefined method `symbolize_keys' for "/contents/index_books/13":String for the following: <%= link_to(image_tag src= asset_path("#{subject.icon}" + '.png'), index_books_path(:subject_id => subject.id)) %> I understand that a hash is expected and a string is being f

Re: [Rails] undefined method `lessons_path'

2014-08-06 Thread Colin Law
On 6 August 2014 07:39, Turcu Marius wrote: > Hi all! I'm new to Rails and i have some problems with this code. > > I have this form in a view of page controller > <%= form_for Lesson.new do %> > <%= label_tag(:number, "Enter the number") %> > <%= text_field_tag :number %> > <%= label_

[Rails] undefined method `lessons_path'

2014-08-05 Thread Turcu Marius
Hi all! I'm new to Rails and i have some problems with this code. I have this form in a view of page controller <%= form_for Lesson.new do %> <%= label_tag(:number, "Enter the number") %> <%= text_field_tag :number %> <%= label_tag(:root, "root") %> <%= text_field_tag :root %>

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Roelof Wobben
I wonder if all the end are right here : https://github.com/roelof1967/sample_app_nutrious/blob/chapter_six/spec/models/user_spec.rb Roelof Op maandag 21 juli 2014 19:23:09 UTC+2 schreef Roelof Wobben: > Nope, > > Otherwise I would not ask here. > > user is filled because of this : > > befor

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Roelof Wobben
Nope, Otherwise I would not ask here. user is filled because of this : before do @user = User.new(name: "Example User", email: "u...@example.com", password: "foobar", password_confirmation: "foobar") end Op maandag 21 juli 2014 19:09:47 UTC+2 schreef Scott Ribe:

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Scott Ribe
On Jul 21, 2014, at 10:53 AM, Roelof Wobben wrote: > Hello, > > I checked and double checked it but it looks allright to me. > > I even copy/paste it to my files but still no luck. > > The problem must be somewhere here: > > describe "with a password that's too short" do > before { @user.

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Roelof Wobben
Hello, I checked and double checked it but it looks allright to me. I even copy/paste it to my files but still no luck. The problem must be somewhere here: describe "with a password that's too short" do before { @user.password = @user.password_confirmation = "a" * 5 } it { should be_

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Eric Saupe
@Ian, He is not using Devise if he is going through the Hartl tutorial. Scott's suggestion is the one that should be followed. On Monday, July 21, 2014 10:36:01 AM UTC-6, Ian_Rgz wrote: > > It seems that you need to create the Devise mapping(If you're using > devise), to fix this you can: > > -

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Benjamin Iandavid Rodriguez
It seems that you need to create the Devise mapping(If you're using devise), to fix this you can: - Set the devise mapping inside a before block - Include Devise test helpers Here's a link to the Devise Wiki Cheers, Ian 2014-07-21 9:26 GMT

Re: [Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Scott Ribe
On Jul 21, 2014, at 10:19 AM, Roelof Wobben wrote: > undefined method `authenticate' for nil:NilClass You're calling method authenticate nil. You need to look at your call to authenticate, and figure out why the object is nil. (This could easily be caused by a simple typo. Check variable name

[Rails] undefined method `authenticate' for nil:NilClass

2014-07-21 Thread Roelof Wobben
Hello, I do still follow the Hartl tutorial. Am at chapter 6 and according to the manual the test schould be successfull but I see these error messages: Failures:

Re: [Rails] undefined method `paginate' for # in Rails Tutorial

2013-10-25 Thread desbest
On Friday, October 25, 2013 10:12:01 AM UTC+1, Colin Law wrote: > On 24 October 2013 23:11, tynamite > > wrote: > > I'm using Rails 3 and I've ran bundle install and put it in my Gemfile. > > Please don't top post, it makes it difficult to follow the thread. > Insert your reply inline. Than

Re: [Rails] undefined method `paginate' for # in Rails Tutorial

2013-10-25 Thread Colin Law
On 24 October 2013 23:11, tynamite wrote: > I'm using Rails 3 and I've ran bundle install and put it in my Gemfile. Please don't top post, it makes it difficult to follow the thread. Insert your reply inline. Thanks. Hopefully you mean that you have put it in Gemfile and run bundle install :) W

Re: [Rails] undefined method `paginate' for # in Rails Tutorial

2013-10-25 Thread Frederick Cheung
On Thursday, October 24, 2013 11:11:33 PM UTC+1, desbest wrote: > > I'm using Rails 3 and I've ran bundle install and put it in my Gemfile. > > And you restarted the app after doing this? Fred > > On 24 October 2013 22:17, Colin Law >wrote: > >> On 24 October 2013 21:47, desbest > >> wrote:

Re: [Rails] undefined method `paginate' for # in Rails Tutorial

2013-10-24 Thread tynamite
I'm using Rails 3 and I've ran bundle install and put it in my Gemfile. On 24 October 2013 22:17, Colin Law wrote: > On 24 October 2013 21:47, desbest wrote: > > Hi, > > I'm getting a undefined method `paginate' for # even > though > > I have gem 'will_paginate' installed. > > Inside the users

Re: [Rails] undefined method `paginate' for # in Rails Tutorial

2013-10-24 Thread Colin Law
On 24 October 2013 21:47, desbest wrote: > Hi, > I'm getting a undefined method `paginate' for # 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

[Rails] undefined method `paginate' for # in Rails Tutorial

2013-10-24 Thread desbest
Hi, I'm getting a undefined method `paginate' for # 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 t

Re: [Rails] undefined method Rails 4

2013-10-23 Thread Fahad Idrees
Just as a first impression, without looking into it in detail - you may have trouble using routes as a class name, it's already a class name under ActionDispatch. However, I think your problem is actually your route: match '/load_data', to: 'routes#new', via: 'get' This isn't a resource route, it

Re: [Rails] undefined method Rails 4

2013-10-23 Thread BalaRaju Vankala
Routes match '/load_data', to: 'routes#new', via: 'get' I think the problem in your routes file. Remove this line "*match '/load_data', to: 'routes#new', via: 'get*' " and add this line-*"resources :routes" *. On Wed, Oct 23, 2013 at 1:33 AM, Jose Urquidi wrote: > Good Day, i'm having a

[Rails] undefined method Rails 4

2013-10-22 Thread Jose Urquidi
Good Day, i'm having a trouble with the routes in Ruby on Rails 4 Error: undefined method `routes_path' View: Load data <%= form_for @route, :html => { :multipart => true } do %> <%= hidden_field_tag 'current_user', @current_user %> <%= file_field_tag :file %>

[Rails] Re: Rails undefined method `model_name' in form partial

2013-08-16 Thread Matt Jones
On Wednesday, 14 August 2013 07:53:20 UTC-4, Павел Добренко wrote: > > i have such model: > > class ToType < ActiveRecord::Base > attr_accessible :Name, :TYP_CCM, :TYP_CCM_TAX, :TYP_CDS_ID, > :TYP_CTM, :TYP_CYLINDERS, :TYP_DOORS, :TYP_HP_FROM, :TYP_HP_UPTO, :TYP_ID, > :TYP_KV_ABS_DES_

[Rails] Re: Rails undefined method `model_name' in form partial

2013-08-16 Thread dasibre
= form_for [:admin, :catalog, :to, *@typ*] do |f| Shouldn't the @typ be @man instead. I don't see any @typ instance variable in your controller. = f.label :id On Wednesday, August 14, 2013 7:53:20 AM UTC-4, Павел Добренко wrote: > > i have such model: > > class ToType < ActiveRecord::B

[Rails] Rails undefined method `model_name' in form partial

2013-08-15 Thread Павел Добренко
i have such model: class ToType < ActiveRecord::Base attr_accessible :Name, :TYP_CCM, :TYP_CCM_TAX, :TYP_CDS_ID, :TYP_CTM, :TYP_CYLINDERS, :TYP_DOORS, :TYP_HP_FROM, :TYP_HP_UPTO, :TYP_ID, :TYP_KV_ABS_DES_ID, :TYP_KV_ASR_DES_ID, :TYP_KV_AXLE_DES_ID, :TYP_KV_BODY_DES_ID, :TYP_KV_BRAKE_S

[Rails] undefined method `stringify_keys' for #

2013-05-20 Thread John Merlino
>From my understanding, you can pass a block to the link_to helper, but the following code gives me an error "undefined method `stringify_keys' for #". = link_to("One time Payment with Paypal or Credit Card", @order.payment_payment_standard_url(new_order_url(invoice: @invoice), payment

Re: [Rails] undefined method `user_id=' for #

2012-12-16 Thread Colin Law
On 16 December 2012 14:19, Nikolay wrote: > After entering data in http://localhost:3000/checkout/update/address form i > getting the following error: > > > NoMethodError in Spree::CheckoutController#update > > undefined method `user_id=' for # Have a look at the Rails Guide on Debugging, it will

[Rails] undefined method `user_id=' for #

2012-12-16 Thread Nikolay
After entering data in http://localhost:3000/checkout/update/address form i getting the following error: NoMethodError in Spree::CheckoutController#update undefined method `user_id=' for # A error chunk of Development.log https://gist.github.com/4307695 -- You received this message because y

[Rails] undefined method `original_filename' for nil:NilClass

2012-11-12 Thread Anna
Hi, although I saw this problem in other blogs, I couldn't make it works. My view: *<%= semantic_form_for :routes_status_race, :url => status_race_admin_routes_path do |f| %>* * <% contact_array = Contact.all.map {|contact| [contact.name, contact.id]}%>* * <% route_importer_array = RouteImporter

[Rails] undefined method 'read' in importing CSV file

2012-09-26 Thread Soichi Ishida
Rails 3.1.3 I am trying to import CSV file and upload database accordingly. the view is the following. <%= form_tag( { :action => "import_csvdata"}, :html => { :multipart => true }) do |f| %> Select a CSV File : <%= file_field_tag :file %>

[Rails] undefined method 'cms_connector_path' during browsercms 3.5.3

2012-09-26 Thread Priyanka Pathak
Hello Guys, I tried to upgrade the browsercms project to latest version (browsercms 3.5.3). But it shows the error like undefined method 'cms_connector_path'. Any one have idea to get rid of it? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscri

Re: [Rails] undefined method `to_sym' for nil:NilClass

2012-09-18 Thread Dave Aronson
On Tue, Sep 18, 2012 at 12:05 PM, Shandy Nantz wrote: > NoMethodError in AuthenticateController#authenticate > > undefined method `to_sym' for nil:NilClass ... > About halfway down I notice an error directing me to my User model in > method 'authenticate' and on line 69. When I go to that line I

[Rails] undefined method `to_sym' for nil:NilClass

2012-09-18 Thread Shandy Nantz
Hi all, I am trying to upgrade my rails 2 app to 3 and am getting this error when trying to login: NoMethodError in AuthenticateController#authenticate undefined method `to_sym' for nil:NilClass The stack trace is: activerecord (3.2.2) lib/active_record/validations/uniqueness.rb:26:in `validat

[Rails] undefined method `singular_route_key' for "User":ActiveModel::Name

2012-09-03 Thread John Merlino
In ActionDispatch::PolymorphicRoutes, there is a call to build_named_route_call an on line 172 (of latest rails code from github), there is a call to singular_route_key: model_name_from_record_or_class(parent).singular_route_key Now model_name_from_record_or_class returns an ActiveModel::Name ob

[Rails] Undefined method `signed' for #

2012-08-28 Thread Romain Tribes
Hello, In my integration test, I want to simulate the user cookie is set. I store an authentication token as a stored cookie. So in my test. I write: cookies.signed[:authentication_token] = user.authentication_token Unforunately, it sends me a Undefined method `signed' for # error. What shou

Re: [Rails] "Undefined method"

2012-08-21 Thread Colin Law
On 21 August 2012 21:12, Tim Slattery wrote: > I have a controller named RegistriesController. It contains a single > method: > > def edit >@jolts_registry = JoltsRegistry.new > end > > This runs, and the associated view is invoked. That stops on line 9: > > <%= form_for @jolts_registry do |f|

Re: [Rails] "Undefined method"

2012-08-21 Thread Walter Lee Davis
On Aug 21, 2012, at 4:12 PM, Tim Slattery wrote: > I have a controller named RegistriesController. It contains a single > method: > > def edit > @jolts_registry = JoltsRegistry.new > end > > This runs, and the associated view is invoked. That stops on line 9: > > <%= form_for @jolts_registry

[Rails] "Undefined method"

2012-08-21 Thread Tim Slattery
I have a controller named RegistriesController. It contains a single method: def edit @jolts_registry = JoltsRegistry.new end This runs, and the associated view is invoked. That stops on line 9: <%= form_for @jolts_registry do |f| %> The message is: undefined method `jolts_registries_path'

Re: [Rails] undefined method `with_indifferent_access' for "":String

2012-08-16 Thread Colin Law
On 16 August 2012 19:20, arturo drlt wrote: > Hi > > I'm having a issue with one object when try to update the attributes in > this object previously saved in the database > > I have one object comp and one object reg they have this relationship > > comp > > has_many regs > > reg > > belongs_to co

[Rails] undefined method `with_indifferent_access' for "":String

2012-08-16 Thread arturo drlt
Hi I'm having a issue with one object when try to update the attributes in this object previously saved in the database I have one object comp and one object reg they have this relationship comp has_many regs reg belongs_to comp when run use the method valid? like this current_contribuyen

Re: [Rails] “undefined method `accept' for nil:NilClass”

2012-08-14 Thread Colin Law
On 14 August 2012 12:14, Colin Law wrote: > On 14 August 2012 12:01, news.anand11 wrote: >> no any of them hasn't helpful to me. I have also got the ans on stack >> overflow but it hasn't work for me. check this : >> http://stackoverflow.com/questions/11946775/undefined-method-accept-for-nilnilcl

Re: [Rails] “undefined method `accept' for nil:NilClass”

2012-08-14 Thread Colin Law
On 14 August 2012 12:01, news.anand11 wrote: > no any of them hasn't helpful to me. I have also got the ans on stack > overflow but it hasn't work for me. check this : > http://stackoverflow.com/questions/11946775/undefined-method-accept-for-nilnilclass Please don't top post, it makes it difficul

Re: [Rails] “undefined method `accept' for nil:NilClass”

2012-08-14 Thread news.anand11
no any of them hasn't helpful to me. I have also got the ans on stack overflow but it hasn't work for me. check this : http://stackoverflow.com/questions/11946775/undefined-method-accept-for-nilnilclass On Tue, Aug 14, 2012 at 4:15 PM, Colin Law wrote: > On 14 August 2012 10:30, news.anand11 w

Re: [Rails] “undefined method `accept' for nil:NilClass”

2012-08-14 Thread Colin Law
On 14 August 2012 10:30, news.anand11 wrote: > I am getting "undefined method `accept' for nil:NilClass" error while > running db:migrate. My configuration is: Googling for rails migrate undefined method `accept' for nil:NilClass shows many hits with the same issue. Have you looked to see if any

[Rails] “undefined method `accept' for nil:NilClass”

2012-08-14 Thread news.anand11
I am getting "undefined method `accept' for nil:NilClass" error while running db:migrate. My configuration is: Rails 3.2.8 MySql 5.1.54 OS : win7 ruby : 1.9.2 my gems list command output: F:\RailsApp\MyApp>gem list *** LOCAL GEMS *** actionmailer (3.2.8) actionp

[Rails] undefined method `scope' for non ActiveRecord class

2012-07-21 Thread Erwin
I am trying to use the geocoding capabilities into a table less model , but the method :scope is not defined .. is there a way to include it ? class SearchLocation require 'geocoder' include ActiveModel::Validations include ActiveModel::Conversion extend ActiveModel::Naming extend Geoco

Re: [Rails] Undefined method error

2012-07-18 Thread Sam Serpoosh
when you want to create a blank instance of a model for a form's sake like this scenario, you should create that blank instance in the controller's action which leads to that specific view you're rendering the form in. As I recall in Michael Hartl's Ruby on Rails Tutorial sample application you re

[Rails] Undefined method error

2012-07-18 Thread One Two
I have been working on a project based on Michael Hartl's book Ruby on Rails Tutorial in order to try to teach myself Ruby on Rails. However, when it tries to render a form designed to allow a user to submit a small message, I get an error saying, "undefined method `model_name' for NilClass:Class".

[Rails] undefined method `xxx_path' for #<#

2012-07-01 Thread Rafal Gawlik
when i try /contact_mail/newi it return me error: undefined local variable or method `em' for #<#:0x007fca21186df0> model: contact_mail.rg class ContactMail < ActiveRecord::Base attr_accessible :email, :message, :name, :subject end controler: contarct_mail_controller.rb class ContactMail

[Rails] undefined method `paginate'

2012-05-22 Thread Amir Z.
I am working with Railsspace social networking book. I stuck in the problem when i am doing paginate for the search result. It gives the following error. NoMethodError in CommunityController#index undefined method `paginate' for # My Controller Index page coding is below def index @title = "Com

[Rails] undefined method `parse' for String:Class

2012-05-14 Thread milo Milo
Hi, I use a script called : add_admin.rake When i execute this : 'rake -s -f Rakefile mailserv:add_admin --trace i have this error : ** Invoke mailserv:add_admin (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute mailserv:add_admin rake aborted! undefined method `pa

Re: [Rails] undefined method `key?' for nil:NilClass,bcrypt-ruby,has_secure_password

2012-05-12 Thread Javier Quarite
On Sat, May 12, 2012 at 7:43 PM, Greg Akins wrote: > On Sat, May 12, 2012 at 8:08 PM, mike wrote: > > > now when I go to localhost:3000/users/new I first get some kind of > > bcrypt-ruby error and then when I reload the page I get a undefined > method > > `key?' for nil:NilClass > > > > I got (s

Re: [Rails] undefined method `key?' for nil:NilClass,bcrypt-ruby,has_secure_password

2012-05-12 Thread Greg Akins
On Sat, May 12, 2012 at 8:08 PM, mike wrote: > now when I go to localhost:3000/users/new I first get some kind of > bcrypt-ruby error and then when I reload the page I get a undefined method > `key?' for nil:NilClass > Please post the bcrypt-ruby error you're seeing and the full trace from the '

[Rails] undefined method `key?' for nil:NilClass,bcrypt-ruby,has_secure_password

2012-05-12 Thread mike
I'm going through DHH's Agile Web Development with Rails for Rails 3.1. In chapter 14 they create a Users sign-in model/view/controller using the has_secure_password method. My user.rb file looks like this class User < ActiveRecord::Base attr_accessible :name, :password_digest, :pass

[Rails] undefined method `mounted_helpers' for devise plugin

2012-04-30 Thread Pab
hi, initially i used i devise as gem but now i want to use devise plugin in my vender/plugin for my application so i gave rails plugin install https://github.com/plataformatec/devise.git after giving install plugin it has been downloaded fine,but now while i was trying to run rails s => Booting WE

Re: [Rails] undefined method `model_name' for NilClass:Class

2012-04-14 Thread Colin Law
On 14 April 2012 13:17, Julian P. wrote: > Hi guys, > I just started using Ruby on Rails. After implementing the RoR blog > tutorial I started with my own data model. > Sadly I am not able to get my create page running. > > Model: > class Activity < ActiveRecord::Base > validates :activity,  :pres

Re: [Rails] undefined method `model_name' for NilClass:Class

2012-04-14 Thread Colin Law
On 14 April 2012 13:17, Julian P. wrote: > Hi guys, > I just started using Ruby on Rails. After implementing the RoR blog > tutorial I started with my own data model. > Sadly I am not able to get my create page running. > > Model: > class Activity < ActiveRecord::Base > validates :activity,  :pres

[Rails] undefined method `model_name' for NilClass:Class

2012-04-14 Thread Julian P.
Hi guys, I just started using Ruby on Rails. After implementing the RoR blog tutorial I started with my own data model. Sadly I am not able to get my create page running. Model: class Activity < ActiveRecord::Base validates :activity, :presence => true validates :forKids, :presence => true valid

Re: [Rails] Undefined method 'menu'

2012-03-25 Thread Colin Law
On 25 March 2012 07:40, Doe J. wrote: > hi im new in ROR development and starting a reservation system project > i am to show the menu that the customer added in the package that he > choose and inside that menu the recipes of the current menu but it rises > me a > > undefined method 'menu' error

[Rails] Undefined method 'menu'

2012-03-24 Thread Doe J.
hi im new in ROR development and starting a reservation system project i am to show the menu that the customer added in the package that he choose and inside that menu the recipes of the current menu but it rises me a undefined method 'menu' error i belive my associations of my model is right but

Re: [Rails] Undefined Method

2012-02-23 Thread Valery Kvon
On 23.02.2012, at 22:23, Roger Patrick wrote: > Now in my gamescontroller I have the following in my index: > > def index >@games = Game.paginate(:per_page => 4, :page => > params[:page]).search(params[:search]) >@games = @games.find_by_console(params[:console]) unless > params[:console

[Rails] Undefined Method

2012-02-23 Thread Roger Patrick
Hi all, I am currently trying to get a bunch of links to to display all the related console records upon button click so e.g. If a user clicks on the Dreamcast link then I would like it to display all records that have Dreamcast stored as their console. I have the following example code in my ind

Re: [Rails] undefined method `key?' for nil:NilClass PaperClip

2012-02-17 Thread Dave Aronson
On Fri, Feb 17, 2012 at 13:10, Felipe Pieretti Umpierre wrote: > NoMethodError in ProjectsController#new > > undefined method `key?' for nil:NilClass That's telling you that there's a problem in the one piece you didn't show us, the controller. Somewhere in your Projects controller, you're call

[Rails] undefined method `key?' for nil:NilClass PaperClip

2012-02-17 Thread Felipe Pieretti Umpierre
Hello, I have a problem with the paperclip, I put on my GemFile gem "paperclip", "~> 2.6.0" I create a migrate class FileUpload < ActiveRecord::Migration def up change_table :projects do |t| t.has_attached_file :image end end def down drop_attached_file :projects, :image

[Rails] undefined method `assert' error appears while running the code

2012-02-14 Thread Vinny V.
Hi, I am new to ruby and I am using ruby with selenium. I want to apply some validations for login section. Following is the code on which I am getting error. @selenium.click "id=loginCloseButton" @selenium.click "css=#lnkLogin > span" @selenium.click "//button[@id='']" begin

Re: [Rails] "undefined method `accept' for nil:NilClass" error after upgrading to 3.2

2012-01-24 Thread Dave Aronson
On Mon, Jan 23, 2012 at 15:57, Shyam Habarakada [GMail] wrote: > I'm getting the error undefined method `accept' for nil:NilClass in my > controller. At what line of code? Show us what's there. Chances are you've got a call that looks like "someobject.accept(someargs)". The variable someobjec

[Rails] "undefined method `accept' for nil:NilClass" error after upgrading to 3.2

2012-01-24 Thread Shyam Habarakada [GMail]
I'm getting the error undefined method `accept' for nil:NilClass in my controller. This is on the development environment running on OSX with mysql. Below is the full stack trace and also my bundle/gem setup information. This is reported by a couple of others on the ruby forums, and I'm trying to s

Re: [Rails] undefined method `gsub!' for 2012-01-22 17:00:00 -0500..2012-01-23 00:00:00 -0500:Chronic::Span

2012-01-22 Thread Tom Meinlschmidt
On Jan 22, 2012, at 23:36 , John Merlino wrote: > Hey all, > > I am getting this error: > > NoMethodError (undefined method `gsub!' for 2012-01-22 17:00:00 > -0500..2012-01-23 00:00:00 -0500:Chronic::Span): > > > in this code: > > date_range = Chronic.parse(the_date, :g

[Rails] undefined method `gsub!' for 2012-01-22 17:00:00 -0500..2012-01-23 00:00:00 -0500:Chronic::Span

2012-01-22 Thread John Merlino
Hey all, I am getting this error: NoMethodError (undefined method `gsub!' for 2012-01-22 17:00:00 -0500..2012-01-23 00:00:00 -0500:Chronic::Span): in this code: date_range = Chronic.parse(the_date, :guess => false) reports.sum_distance_by_date(date_range).ea

  1   2   3   4   >