[Rails] Re: undefined method `build_

2016-01-02 Thread fugee ohu
@school = current_user.create_school(school_params) undefined method `create_school' for # On Saturday, January 2, 2016 at 3:51:12 PM UTC-5, fugee ohu wrote: > > def create > @school = current_user.build_school(school_params) > > causes the above error my models are users has_one pro

[Rails] Re: undefined method `extend' for class `ActiveRecord::Associations::CollectionProxy'

2015-06-02 Thread Nick Coyne
We also get these errors on heroku from time to time. I wish I knew what was causing them. A restart always solves the problem. N. On Monday, April 20, 2015 at 10:31:13 PM UTC+12, Codrut Gusoi wrote: > > I have a rails 3.2.21 app hosted on Heroku, using Heroku Postgres. I got > the "undefined m

[Rails] Re: undefined method `symbolize_keys' for

2014-11-10 Thread Dave Castellano
OK, Got it!! Thanks for the help! Dave Castellano -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrail

Re: [Rails] Re: undefined method `symbolize_keys' for

2014-11-10 Thread Colin Law
On 10 November 2014 21: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. I susp

[Rails] Re: undefined method `symbolize_keys' for

2014-11-10 Thread Dave Castellano
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. <%= image_tag asset_path("#{subject.icon}" + '.png') %> works fine

Re: [Rails] Re: undefined method `lessons_path'

2014-08-06 Thread Colin Law
On 6 August 2014 08:17, Turcu Marius wrote: > Thanks, Colin.Yes, i know, i jumped in front of a train with this but > must do this aplication...what must have in routes? now i have get > 'lessons/add_lesson'And another question if i what to use this form > in a view created by another controll

[Rails] Re: undefined method `lessons_path'

2014-08-06 Thread Turcu Marius
Thanks, Colin.Yes, i know, i jumped in front of a train with this but must do this aplication...what must have in routes? now i have get 'lessons/add_lesson'And another question if i what to use this form in a view created by another controller how i make the connection? Thanks for your qui

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

2013-10-26 Thread Kashif Umair Liaqat
I am a little late in discussion but I've the solution to the problem :) If you are using rails 4 then try this. @users = User.all.paginate(page: params[:page] Note that User.all will be an ActiveRelation on which paginate method works. If you are using rails 3 then try this. @users = User.w

[Rails] Re: undefined method `stringify_keys' for #

2013-05-21 Thread Frederick Cheung
On Tuesday, May 21, 2013 12:02:20 AM UTC+1, John Merlino wrote: > > 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 #". > > I don't think you can pass both a block & content as an argument. C

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

2012-12-17 Thread Sumit Srivastava
On Sunday, 16 December 2012 19:49:11 UTC+5:30, 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 # > > > A error chunk of Developm

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

2012-12-16 Thread Nikolay
My gemfile is https://gist.github.com/4307796 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr

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

2012-11-12 Thread Anna
Now is solved, just in case that somebody will has the same problem, here is the solution, the view was right, I just change the controller part: *collection_action :status_race, :method => :post do* * * *uploaded_io = params[:routes_status_race][:uploaded_data]* * * *File.open(Rails.root

[Rails] Re: undefined method 'cms_connector_path' during browsercms 3.5.3

2012-09-28 Thread Priyanka Pathak
Hello Guys, Found the solution to overcome this problem by replacing 'cms_connector_path' to 'cms.connector_path' -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, sen

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

2012-09-24 Thread Shandy Nantz
That was it exactly! Sorry it took me so long to reply, I had some fires that needed to be stomped out. Thanks again, -S -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,

Re: [Rails] Re: "Undefined method"

2012-08-24 Thread selva4...@gmail.com
On Thu, Aug 23, 2012 at 6:17 PM, Tim Slattery wrote: > Colin Law wrote: > > >>It was not that in the first place, according to your post it was >><%= form_for @jolts_registry do |f| %> > > ah..Right. I tried a good many things, kept getting the exact same > error until putting the "action" phrase

[Rails] Re: "Undefined method"

2012-08-23 Thread Tim Slattery
Colin Law wrote: >It was not that in the first place, according to your post it was ><%= form_for @jolts_registry do |f| %> ah..Right. I tried a good many things, kept getting the exact same error until putting the "action" phrase in. yes I looked at the routing doc. Didn't see anything to help

Re: [Rails] Re: "Undefined method"

2012-08-22 Thread Colin Law
On 22 August 2012 21:08, Tim Slattery wrote: > Tim Slattery wrote: > >>Colin Law wrote: >> >> Don't understand, which route? >>> >>>You are trying to create a form for a JoltRegistry, that expects to >>>submit to a jolts_registries_path (as in the error message). The >>>normal way to gener

[Rails] Re: "Undefined method"

2012-08-22 Thread Tim Slattery
Tim Slattery wrote: >Colin Law wrote: > > >>> Don't understand, which route? >> >>You are trying to create a form for a JoltRegistry, that expects to >>submit to a jolts_registries_path (as in the error message). The >>normal way to generate the route would be to use >>resources :jolts_registri

Re: [Rails] Re: "Undefined method"

2012-08-22 Thread Colin Law
On 22 August 2012 17:38, Tim Slattery wrote: > Colin Law wrote: > > >>> Don't understand, which route? >> >>You are trying to create a form for a JoltRegistry, that expects to >>submit to a jolts_registries_path (as in the error message). The >>normal way to generate the route would be to use >>

[Rails] Re: "Undefined method"

2012-08-22 Thread Tim Slattery
Colin Law wrote: >> Don't understand, which route? > >You are trying to create a form for a JoltRegistry, that expects to >submit to a jolts_registries_path (as in the error message). The >normal way to generate the route would be to use >resources :jolts_registries I've done that. Same messag

Re: [Rails] Re: "Undefined method"

2012-08-22 Thread Colin Law
On 22 August 2012 13:47, Tim Slattery wrote: > Colin Law wrote: > >>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 ass

[Rails] Re: "Undefined method"

2012-08-22 Thread Tim Slattery
Colin Law wrote: >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: >> >> <%= f

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

2012-08-17 Thread arturo drlt
UPDATE code: collection_select(:comp, :comp_emi_reg_ids, CompEmiReg.where("comp_id = ?", @comp.id), :id, :reg_fil, {:include_blank => false}) return this error NoMethodError (undefined method `with_indifferent_access' for "":String): and this code: collection_select(:comp, :comp_emi_reg_id

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

2012-08-17 Thread arturo drlt
Sorry i wrote a wrong error the collection_select return this error undefined method `comprobante_emis_regs_reg_fil' for # collection_select(:comp, :comp_emis_regs_regimen_fiscal, current_contribuyente.contribuyente_regs, :reg_fil, :reg_fil, {:include_blank => false}) -- Posted via http://w

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

2012-08-17 Thread arturo drlt
Peter p. wrote in post #1072655: > arturo drlt wrote in post #1072587: > > > > Hi arturo drlt, > > Try without "fields_for" > It really works! ;-) > > Regards, > Peter > ***

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

2012-08-17 Thread Peter p.
arturo drlt wrote in post #1072587: > 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 > > wh

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

2012-08-16 Thread arturo drlt
Colin Law wrote in post #1072606: > On 16 August 2012 19:20, arturo drlt wrote: > > What is current_contribuyente? > > Colin current_contribuyente is a method that works similar to current_user work like these: def current_contribuyente current_user.contribuyente end it just a custom curren

Re: [Rails] Re: Undefined method error

2012-07-19 Thread Sam Serpoosh
Ok, of course you can do this. The thing that you should pay attention to is that when the user fill the information in your special form in the home page (including user_email, user_password, micropost_content) you should authorize the user first by his/her user_email and password and the combinat

[Rails] Re: Undefined method error

2012-07-18 Thread One Two
Thank you for the help. Putting "@micropost = Micropost.new" in pages_controller.rb solved this error. However, I now have a new error which states "undefined method `humanize' for nil:NilClass". It says the error is at the line "<%= f.label @user.email %>". I defined @user = User.new in pages_

[Rails] Re: undefined method `paginate'

2012-05-24 Thread Matt Jones
On Tuesday, 22 May 2012 09:37:04 UTC-4, Ruby-Forum.com User wrote: > > 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. > > Don't use that book - it's severely outdated and will cause y

[Rails] Re: undefined method `paginate'

2012-05-23 Thread Juan Pablo Avello
El miércoles, 23 de mayo de 2012 08:31:51 UTC+2, Ruby-Forum.com User escribió: > > > You dont have a "def paginate " method defined in your controller. > > Anyway you'll probably want to use a pagination gem such as Kaminari, > > which > > includes all you need for that purpose. > > Hi Juan,

[Rails] Re: undefined method `paginate'

2012-05-22 Thread Amir Z.
> You dont have a "def paginate " method defined in your controller. > Anyway you'll probably want to use a pagination gem such as Kaminari, > which > includes all you need for that purpose. Hi Juan, Thanks for the help message. Juan I am newbie on ROR could you please help me how to install kam

[Rails] Re: undefined method `paginate'

2012-05-22 Thread Juan Pablo Avello
El martes, 22 de mayo de 2012 15:37:04 UTC+2, Ruby-Forum.com User escribió: > > 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 > > unde

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

2012-05-15 Thread milo Milo
i find the solution update Highline using : gem install highline -- Wesley MOUEDINE ASSABY www.mouedine.net -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to

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

2012-05-13 Thread mike
I think I figured out what happened. I installed bcrypt-ruby and ran bundle install but never restarted the server. Everything's working now. On Saturday, May 12, 2012 7:08:33 PM UTC-5, mike wrote: > > I'm going through DHH's Agile Web Development with Rails for Rails 3.1. In > chapter 14 the

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

2012-05-13 Thread dasibre
did you install the bcrypt gem. Make sure its added to your gemfile then run bundle install. On May 12, 8:08 pm, mike wrote: > 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_passwo

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

2012-04-14 Thread Colin Law
On 14 April 2012 15:55, Julian P. wrote: > Colin Law wrote in post #1056501: >> On 14 April 2012 13:17, Julian P. wrote: >>> end >>>  end >>> end >> >> What does the last end match with? >> >> Colin >> > > Damn it that was the mistake. I was always looking at the wrong spot. > Thank you very much

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

2012-04-14 Thread Julian P.
Colin Law wrote in post #1056501: > On 14 April 2012 13:17, Julian P. wrote: >> end >> end >> end > > What does the last end match with? > > Colin > Damn it that was the mistake. I was always looking at the wrong spot. Thank you very much Colin. Julian -- Posted via http://www.ruby-forum.com/

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

2012-04-14 Thread Julian P.
new.html.erb New Activity <%= form_for @activity do |f| %> <% if @activity.errors.any? %> <%= pluralize(@activity.errors.count, "error") %> prohibited this activity from being saved: <% @activity.errors.full_messages.each do |msg| %>

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

2012-04-14 Thread Colin Law
On 14 April 2012 14:11, Julian P. wrote: > Colin Law wrote in post #1056490: >> >> I think the problem is that you have just used >> <%= render 'form' %> >> to render the form.  You have not passed the @activity variable to the >> form.  Have a look at the Rails Guide on Layouts and Rendering for

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

2012-04-14 Thread Julian P.
Colin Law wrote in post #1056490: > > I think the problem is that you have just used > <%= render 'form' %> > to render the form. You have not passed the @activity variable to the > form. Have a look at the Rails Guide on Layouts and Rendering for how > to use :locals to pass variables when rende

[Rails] Re: Undefined method 'menu'

2012-03-25 Thread Doe J.
Colin Law wrote in post #1053187: > On 25 March 2012 07:40, Doe J. wrote: >> package_line_item.rb >> has_many :menus , :through => :package_line_items, :uniq => true >> >> >> redirect_to @reservation ,:notice => "added menu" >> resources :package_line_items >> resources :menu_categories >> >>

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

2012-03-14 Thread bujjibabu balaga
hi Attachments: http://www.ruby-forum.com/attachment/7148/IMG00176.jpg -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. T

Re: [Rails] Re: Undefined Method

2012-02-23 Thread Valery Kvon
On 23.02.2012, at 23:15, Roger Patrick wrote: >> > def index > @games = games_relation.paginate(:per_page => 4, :page => > params[:page]).search(params[:search]) > end > > in my game.rb file I will have the following: > > games_relation = case params[:console].present? > when true then Game.wh

[Rails] Re: Undefined Method

2012-02-23 Thread Roger Patrick
Valery Kvon wrote in post #1048505: > On 23.02.2012, at 22:23, Roger Patrick wrote: > >> website I receive the following error message which I assume is to say >> activerecord is not connecting: >> >> undefined method `find_by_console' for >> # > > At first, .find_by_ is a ActiveRecord::Relation's

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

2012-02-17 Thread Felipe Pieretti Umpierre
The same error, it look like the paperclip is not working, but I'm following the documentation: http://rubydoc.info/gems/paperclip/2.6.0/frames Thank you. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: T

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

2012-02-17 Thread Erwin
in your create action why do you create the record before validation ? should not it be ? def create @project = Project.new(params[:project]) if @project.save flash[ :notice ] = "Projeto criado com sucesso !" redirect_to :action => "index" else render :new en

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

2012-02-17 Thread Felipe Pieretti Umpierre
I'm sorry Dave, I was updated the post, but I got make it work, but now another error is showing, when I put a image, on my file_field the rails add a div error. I don't know why... Now I put the image on file field, but when I click on submit, the page is reload to my new action, with the erro

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

2012-01-23 Thread Velimir L.
You have to convert the input to string as: the_date.to_s Chronic.parse(the_date.to_s) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@goog

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

2012-01-23 Thread John Merlino
using Chronic.parse without false got rid of that issue On Jan 23, 10:21 am, John Merlino wrote: > thanks for response, > > Now I get a new issue: > > ActiveRecord::StatementInvalid in HomesController#map > > PGError: ERROR:  time zone displacement out of range: "(2012-01-23 > 10:00:00 -0500..201

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

2012-01-23 Thread John Merlino
thanks for response, Now I get a new issue: ActiveRecord::StatementInvalid in HomesController#map PGError: ERROR: time zone displacement out of range: "(2012-01-23 10:00:00 -0500..2012-01-24 00:00:00 -0500)" LINE 1: 000621371192) AS sum FROM reports WHERE "time" = '(2012-01-...

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

2011-11-18 Thread John Merlino
Frederick Cheung wrote in post #1032161: > On Nov 16, 1:46pm, John Merlino wrote: >> thanks for response >> >> THis here would produce syntax error: >> >> :include => {:reports, :notifications => :notification_codes} >> > oops, that should have been [:reports, {:notifications > => :notification_co

Re: [Rails] Re: undefined method `find_all'

2011-11-17 Thread Colin Law
On 17 November 2011 13:56, gbolahan a. wrote: > i have modified my code as follows: > > <%= collection_select(:category, :id, @categories, :id, :category_type, > options ={:prompt => "-Select a Category"}, :class =>"category") %> > > i Hav also modified the definition in my controllers as follows:

[Rails] Re: undefined method `find_all'

2011-11-17 Thread gbolahan a.
i have modified my code as follows: <%= collection_select(:category, :id, @categories, :id, :category_type, options ={:prompt => "-Select a Category"}, :class =>"category") %> i Hav also modified the definition in my controllers as follows: @categories = category.find(:all) but it still gives m

Re: [Rails] Re: undefined method `find_all'

2011-11-17 Thread Colin Law
On 17 November 2011 13:11, gbolahan a. wrote: > i have modified my code as follows: > > <%= collection_select(:category, :id, @categories, :id, :category_type, > options ={:prompt => "-Select a Category"}, :class =>"category") %> > > i Hav also modified the definition in my controllers as follows:

Re: [Rails] Re: undefined method `find_all'

2011-11-17 Thread Peter De Berdt
On 17 Nov 2011, at 14:11, gbolahan a. wrote: i Hav also modified the definition in my controllers as follows: @categories = category.find(:all) Classes should have a capital: Category.find(:all) and you could even bring this down to: Category.all Best regards Peter De Berdt -- You rec

[Rails] Re: undefined method `find_all'

2011-11-17 Thread gbolahan a.
i have modified my code as follows: <%= collection_select(:category, :id, @categories, :id, :category_type, options ={:prompt => "-Select a Category"}, :class =>"category") %> i Hav also modified the definition in my controllers as follows: @categories = category.find(:all) You have a nil obje

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

2011-11-16 Thread Frederick Cheung
On Nov 16, 1:46 pm, John Merlino wrote: > thanks for response > > THis here would produce syntax error: > > :include => {:reports, :notifications => :notification_codes} > oops, that should have been [:reports, {:notifications => :notification_codes}] also, if notification belongs_to :notificat

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

2011-11-16 Thread John Merlino
thanks for response THis here would produce syntax error: :include => {:reports, :notifications => :notification_codes} So I try this (to ensure :reports has a value): {:include => {:reports => {}, :notifications => :notification_codes}} And this is ultimately what it would look like: User.wh

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

2011-11-16 Thread Frederick Cheung
On Nov 15, 11:06 pm, John Merlino wrote: > this error usually occurs when trying to mix 1st and 2nd order > relationships in a single to_json call: > > undefined method `macro' for nil:NilClass > > Rails 3 has this way to support 2nd order relationships: > > http://apidock.com/rails/ActiveRecord

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

2011-11-15 Thread John Merlino
It was working fine until I added the 2nd order relationship. The documentation isnt clear about how to add the 2nd order relationship On Nov 15, 6:20 pm, Everaldo Gomes wrote: > Hi! > > The call to to_json shouldn't be the last call in the statement? > > Regards, > Everaldo > > > > > > > > On Tu

Re: [Rails] Re: undefined method `updated_at' for #

2011-11-02 Thread Colin Law
On 2 November 2011 16:56, Rolando Sotomayor wrote: > I have these tables on my database with these fields each one: > > ->classifieds:(id,title,location,description,email,create_at,updated_at,category_id,content_type,picture) I presume you just typed that and have mistyped. That is why I asked f

[Rails] Re: undefined method `updated_at' for #

2011-11-02 Thread Rolando Sotomayor
I have these tables on my database with these fields each one: ->classifieds:(id,title,location,description,email,create_at,updated_at,category_id,content_type,picture) ->categories(id,name) This is what I have in the followings files: ->classified_co

[Rails] Re: undefined method `all' for MyModel:Module

2011-10-25 Thread tspore
Thank you very much for helping me think through this. Its a old project, where upgrading it is going to be a couple week process. On Oct 24, 11:44 pm, Frederick Cheung wrote: > On Oct 24, 10:20 pm,tspore wrote: > > > What I'm thinking is that my application is called the same name as > > MyModel

[Rails] Re: undefined method `all' for MyModel:Module

2011-10-24 Thread Frederick Cheung
On Oct 24, 10:20 pm, tspore wrote: > What I'm thinking is that my application is called the same name as > MyModel so in Application i'm loading in module MyModel ah, if you're defining module MyModel end somewhere like that then you can't also have class MyModel < AR:Base end in developmen

[Rails] Re: undefined method `all' for MyModel:Module

2011-10-24 Thread tspore
What I'm thinking is that my application is called the same name as MyModel so in Application i'm loading in module MyModel But that is calling - class Application < Rails::Application end But I'm not really sure how else to debug this. Anythoughts? On Oct 24, 9:09 am, Frederick Cheung

[Rails] Re: undefined method `all' for MyModel:Module

2011-10-24 Thread Frederick Cheung
On Oct 24, 4:03 pm, tspore wrote: > Right. MyModel - would be in Theory the AR model, but it seems to be > erring out on the Helper. (Which it also has) > So for some reason I have a few of the upgraded models, which I can't > run basic querries against. But some which I can. > However, I don't

[Rails] Re: undefined method `all' for MyModel:Module

2011-10-24 Thread tspore
Right. MyModel - would be in Theory the AR model, but it seems to be erring out on the Helper. (Which it also has) So for some reason I have a few of the upgraded models, which I can't run basic querries against. But some which I can. However, I don't see anything which would not allow those selec

[Rails] Re: undefined method `all' for MyModel:Module

2011-10-24 Thread Frederick Cheung
On Oct 24, 5:26 am, tspore wrote: > I am in the middle of upgrading an application which is only at 2.3 to > rails 3.0 (Then to rails 3.1) Iv'e gotten the application to begin > running. And it can load some models. For example in users I can - > Query user.first. But in this model if I call MyM

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

2011-10-17 Thread Sergey T.
Daniel Waite, thanks! :) just inattention. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group,

Re: [Rails] Re: undefined method keys for ActiveRecord::Relation when executing to_json

2011-10-05 Thread Colin Law
On 5 October 2011 16:32, Heinz Strunk wrote: > Ehm, yes. > > Changing it to > has_many :avatar_attributes, :class_name => 'Attribute' > did the trick. > > > Thanks a lot for the hint, Colin! Glad to be of help. Colin > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this mes

[Rails] Re: undefined method keys for ActiveRecord::Relation when executing to_json

2011-10-05 Thread Heinz Strunk
Ehm, yes. Changing it to has_many :avatar_attributes, :class_name => 'Attribute' did the trick. Thanks a lot for the hint, Colin! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to th

[Rails] Re: undefined method keys for ActiveRecord::Relation when executing to_json

2011-10-05 Thread Heinz Strunk
Oh, yeah. You might be right with the reserved word! avatar.rb: class Avatar < ActiveRecord::Base attr_accessible :name, :level, :current_xp, :overall_xp, :gender_cd as_enum :gender, :female => 0, :male => 1 has_one :user has_many :attributes ... attribute.rb: class Attribute < ActiveReco

[Rails] Re: undefined method `options' for #

2011-09-26 Thread Anait M.
My eventMachine/oath/em-http-request gem combination seems to not work (pl see the code and error attached). Can anyone help me to resolve this? Thanks in advance! Attachments: http://www.ruby-forum.com/attachment/6625/undefined_method.docx -- Posted via http://www.ruby-forum.com/. -- You re

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

2011-09-02 Thread Jim Ruther Nill
On Fri, Sep 2, 2011 at 7:00 PM, Pab wrote: > Hi, > > in @employee = Employee.new, what .new describes about? and i gave > @employee = Employee.search > instead of that, which result in error > > undefined method `search' for # > > I suggest you read some tutorials first Pab > > thanks, > -pab

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

2011-09-02 Thread Pab
Hi, in @employee = Employee.new, what .new describes about? and i gave @employee = Employee.search instead of that, which result in error undefined method `search' for # thanks, -pab -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.

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

2011-09-02 Thread Jim Ruther Nill
On Fri, Sep 2, 2011 at 6:31 PM, Pab wrote: > hi > > def search > @employee > end > > i have done the above, but it shows following error > > undefined method `model_name' for NilClass:Class > > Extracted source (around line #1): > > 1: <%= form_for(@employee) do |e| %> > 2: <%= e.error_msg %> >

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

2011-09-02 Thread Pab
hi def search @employee end i have done the above, but it shows following error undefined method `model_name' for NilClass:Class Extracted source (around line #1): 1: <%= form_for(@employee) do |e| %> 2: <%= e.error_msg %> 3: EMP ID<%= e.text_field :id %> 4: <%= e.submit 'search', :controller

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

2011-09-02 Thread Jim Ruther Nill
On Fri, Sep 2, 2011 at 5:30 PM, Pab wrote: > Hi, > > > def search > > end > > > > def search1 > >@employee = Employee.find(params[:id]) >respond_to do |format| > format.html{render :partial => 'show'} > format.xml >end > > end > > >

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

2011-09-02 Thread Pab
Hi, def search end def search1 @employee = Employee.find(params[:id]) respond_to do |format| format.html{render :partial => 'show'} format.xml end end search.html is <%= form_for(@employee) do |e| %> EMP ID<%= e.text

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

2011-09-01 Thread 7stud --
Pab wrote in post #1019703: > Hi Jim, > > > > I got nothing in my action search and linked the search button to > search1 action, which contains the find function is that a problem? > Yes. Here is the order of what happens: 1) The browser sends a request that hits the action connected to yo

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

2011-09-01 Thread Pab
Hi Jim, I got nothing in my action search and linked the search button to search1 action, which contains the find function is that a problem? thanks, -pab -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, s

[Rails] Re: undefined method `collect' for 1:Fixnum

2011-08-24 Thread Frederick Cheung
On Aug 24, 11:17 am, "dpatterson2...@hotmail.com" wrote: > I am trying to do the following > > <%= effort.user_id.collect(&:full_name) %> > > When I run my app I get the following error: undefined method > `collect' for 1:Fixnum > What is that supposed to do ? user_id is an integer so calling c

[Rails] Re: undefined method `post' and 'assigns'

2011-07-07 Thread Frederick Cheung
On Jul 6, 9:18 pm, Yennie wrote: > I did like that > > require 'spec_helper' > > describe "UserController" do >   describe "GET index" do >     it "should be successful" do >       get 'index' >       response.should be_success >     end > >     it "render the index template" do >       get :index

[Rails] Re: undefined method `post' and 'assigns'

2011-07-06 Thread Yennie
On Jul 6, 3:34 pm, Frederick Cheung wrote: > On Jul 6, 8:19 pm, Yennie wrote: > > > Hi, > > > I have an error of undefined method. > > can anyone help me to solve it. > > I follow the tutorial to practicing testing controller of rails, and > > now i got stuck with the error.. plz help > > rspec

[Rails] Re: undefined method `post' and 'assigns'

2011-07-06 Thread Yennie
On Jul 6, 3:34 pm, Frederick Cheung wrote: > On Jul 6, 8:19 pm, Yennie wrote: > > > Hi, > > > I have an error of undefined method. > > can anyone help me to solve it. > > I follow the tutorial to practicing testing controller of rails, and > > now i got stuck with the error.. plz help > > rspec

[Rails] Re: undefined method `post' and 'assigns'

2011-07-06 Thread Frederick Cheung
On Jul 6, 8:19 pm, Yennie wrote: > Hi, > > I have an error of undefined method. > can anyone help me to solve it. > I follow the tutorial to practicing testing controller of rails, and > now i got stuck with the error.. plz help > rspec probably doesn't understand that you're testing a controll

[Rails] Re: undefined method `post' and 'assigns'

2011-07-06 Thread Yennie
On Jul 6, 3:19 pm, Yennie wrote: > Hi, > > I have an error of undefined method. > can anyone help me to solve it. > I follow the tutorial to practicing testing controller of rails, and > now i got stuck with the error.. plz help > > error: > undefined method `post' for > # > undefined method `as

Re: [Rails] Re: undefined method for 1:Fixnum

2011-06-28 Thread Michael Pavling
Good catch, Fred. On 29 June 2011 00:04, John Merlino wrote: > actually you are right. my intention was to get the object with the > smallest sequence number So when you said in your first post: "This line right here ... produces the above error.", how had you determined it was that line? The er

[Rails] Re: undefined method for 1:Fixnum

2011-06-28 Thread Frederick Cheung
On Jun 29, 12:04 am, John Merlino wrote: > actually you are right. my intention was to get the object with the > smallest sequence number, not return the sequence number itself. The > ruby documentation says this: "Returns the object in enum with the > minimum value. " for min. Hence, I thought

[Rails] Re: undefined method for 1:Fixnum

2011-06-28 Thread John Merlino
actually you are right. my intention was to get the object with the smallest sequence number, not return the sequence number itself. The ruby documentation says this: "Returns the object in enum with the minimum value. " for min. Hence, I thought it would return the object. > I suspect the error i

[Rails] Re: undefined method for 1:Fixnum

2011-06-28 Thread Frederick Cheung
On Jun 28, 6:10 pm, John Merlino wrote: > This line right here: > > available_books.flatten.map(&:sequence).min > > produces the above error. It's this part "map(&:sequence).min" that is > causing it. Basically I am flattening the array of subbooks and then > searching the one which has the low

[Rails] Re: undefined method for 1:Fixnum

2011-06-28 Thread John Merlino
hmmm, this returns true as well: logger.info "is true? #{available_books.flatten.first.respond_to? ('sequence')}" On Jun 28, 3:22 pm, John Merlino wrote: > Thanks for response. I checked with logger and it is indeed an array: > > logger.info "Is array? #{available_books.flatten.is_a?(Array)

[Rails] Re: undefined method for 1:Fixnum

2011-06-28 Thread John Merlino
Thanks for response. I checked with logger and it is indeed an array: logger.info "Is array? #{available_books.flatten.is_a?(Array)}" #outputs: true It's an array of subbook objects: ### Now when I look at above, it appears to reference the class itself, and

[Rails] Re: undefined method culture_id

2011-06-15 Thread Andrew Skegg
> I run those code in terminal user_instance = User.find(1) => it shows me all the data in the User table and then i run Picture.where(:album_id => :album, :culture_id => user_instance.culture_id).first > =>nil As others have said, you are not providing enough information to diagnoise the prob

[Rails] Re: undefined method `task' for #

2011-06-07 Thread rtacconi
Hi I changed gem 'rake', '~> 0.8.7' to gem 'rake', '0.8.7' and it solved the issue thank you On Jun 7, 1:27 pm, Dhruva Sagar wrote: > Afaik i've seen similar weird issues, although locally with rake 0.9.0, you > might want to downgrade to 0.8.7... > > > > > > > > > > On Tue, Jun 7, 2011 at

[Rails] Re: undefined method `task' for #

2011-06-07 Thread rtacconi
Hi I changed gem 'rake', '~> 0.8.7' to gem 'rake', '0.8.7' and it solved the issue thank you On Jun 7, 1:27 pm, Dhruva Sagar wrote: > Afaik i've seen similar weird issues, although locally with rake 0.9.0, you > might want to downgrade to 0.8.7... > > > > > > > > > > On Tue, Jun 7, 2011 at

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

2011-05-27 Thread Michael Pavling
On 27 May 2011 14:23, Louis Wrobel wrote: > Michael Pavling wrote in post #1001495: > >> Just a guess, but you might want: >>  @new_trad = Translation.new > > No, it's Translations and I forgot to tell that it's not an ActiveRecord > model. Right... so the form_for stuff won't work then, unless y

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

2011-05-27 Thread Louis Wrobel
Michael Pavling wrote in post #1001495: > Just a guess, but you might want: > @new_trad = Translation.new No, it's Translations and I forgot to tell that it's not an ActiveRecord model. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

Re: [Rails] Re: undefined method `posts_path'

2011-05-24 Thread John
On Tue, May 24, 2011 at 1:58 AM, john shelfer wrote: > > > On Mon, May 23, 2011 at 11:32 PM, Hassan Schroeder < > hassan.schroe...@gmail.com> wrote: > >> On Mon, May 23, 2011 at 8:17 PM, John shelfer >> wrote: >> >> > But to run a migration "rake db:migrate" is right command ,still >> > it didn't

  1   2   3   4   5   >