@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
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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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
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
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
>>
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
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
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
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
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
Peter p. wrote in post #1072655:
> arturo drlt wrote in post #1072587:
>
>
>
> Hi arturo drlt,
>
> Try without "fields_for"
> It really works! ;-)
>
> Regards,
> Peter
> ***
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
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
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
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_
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
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,
> 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
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
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
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
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
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
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/
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| %>
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
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
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
>>
>>
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
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
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
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
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
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
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
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
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-...
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
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:
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
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:
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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
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
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
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.
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 %>
>
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
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
>
>
>
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
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
> 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
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
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
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
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
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 - 100 of 426 matches
Mail list logo