Displaying 20 results from an estimated 2000 matches similar to: "Understanding “create_association” and invalid objects"
2009 Aug 12
5
Challenge for object_id, Garbage Value
I am facing strange problem.
I have an object @part=MainPart.find(:all)
1. @part.each_with_index do |mainpart,index|
2. <p><%= mainpart.object_id%></p>
3. end
Here problem is that object_id is reserved for rails. Here
object_id field in my table . Now i want to get value <%=
mainpart.object_id%> is giving GARBAGE VALUE. Is there any solution
apart from
2009 Dec 27
5
Difficulties in understanding Rail-Plugins in depth
Hi,
i try to understand how plugins work in detail.
Often you see stuff like:
class Post < ActiveRecord::Base
acts_as_commentable
end
I wonder what''s happen all there.
What kind of language-feature is behind this call "acts_as_commentable" ?
In my opinion you need some kind of extend or include to extend the
functionality of a model. And exactly this is which i found
2011 Feb 03
2
Possible to ask rspec to show more code in the debugger?
This came up from an other issue where I needed to go check something in
test::unit. Immediately when I dropped into the debugger in test::unit I saw
something I have been missing: test unit by default shows a number of lines
of code. Is there a way to make the rspec debugger do this?
I am not sure if it is just me, but seems to me that when I moved to rspec,
certain things which seemed to be
2009 Oct 23
1
Anyone using the rspec textmate bundle with Ruby 1.9.1
I''m now in the process of facing converting a rails app to use Ruby 1.9.1.
Has anyone figured out how to use 1.9 with the RSpec bundle in
textmate and preferably how to switch back and forth?
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn:
2009 May 24
11
Class method not being stubbed
Hi guys. I''m setting an expectation on a class method. For some
reason, the method isn''t being stubbed, and the expectation isn''t
seeing the call.
In KeywordListsController#create, I call the private method
#create_keywords_and_associate, which calls AdSenseHeavenParser#parse
.
Thus, some of my specs set an expectation on AdSenseHeavenParser#parse
. However, that
2009 Oct 30
1
Any pioneers who've configured passenger to support some apps running in 1.8.x others in 1.9?
Passenger configuration selects which ruby executable to use via a
global configuration variable (at least for Apache, I assume it''s the
same for Nginx).
I''m in a situation where I''ve got at least one rails app I''d like to
run on 1.9 while others remain on 1.8. This is for my development
machine running OS X 10.6. Normally I just use the Passenger PrefPane,
2009 Apr 26
9
Problems running features with Textmate Cucumber bundle
I finally plunked down for the beta RSpec bundle and I''m working
through the initial example. Although I''m a fairly experienced RSpec
user, I''m stlll learning new tricks.
Anyway, I''m going though the mastermind example, and everything is
going well, except that I decided to also try out the Textmate bundle
for Cucumber. I decided to use Ben Mabey''s
2010 Feb 10
7
undefined method join
Hey all,
I get an undefined method `join'' for #<String NoMethodError.
student.rb
has_one :student_fail
attr_accessor :student_fail_attribute
#controller
def student_fail
@student = @student.find params[:id]
def update_student_fail
@student.build_student_fail params[:student][:student_fail_attribute]
if @student.save
#view
form_for @student do |f|
2011 Apr 28
3
difference between validate and validate_on_create
i just ran into a problem with some test, and i am not exactly sure why,
but the difference happened when i changed my model validation from:
validate :custom_validation
to:
validate_on_create :custom_validation
can someone give me any ideas on where in the chain the validation takes
place?
thanks!
--
Posted via http://www.ruby-forum.com/.
2010 Apr 13
1
People Centric recherche plusieurs développeurs Ruby on Rails
Un bon job de Developpeur Expérimenté Ruby on Rails, sur logiciel
marketing digital, équipe pro, Paris 2, Sté Cotée, Paris Rou
SiliconValley.
Veuillez consulter le lien suivant pour plusieurs détails:
http://www.people-centric.fr/2010/01/27/type/6368-job-developpeur-ruby.html/fr/
Cordialement,
Roxana Stefan Malene
Chargée de recrutement en IT
Mail:
2010 Jun 14
8
Default Test library
Along the same lines as the default javascript library discussion [1],
why don''t we switch the default test library to RSpec? The stats [2]
posted by Xaviar in the other thread seem to support that RSpec is the
preferred way to test.
[1] http://groups.google.com/group/rubyonrails-core/browse_thread/thread/e9b9cf2233d9a59b
[2] http://survey.hamptoncatlin.com/survey/stats
--
You received
2009 Jun 09
8
Ui Designing with Rails opposed to PHP
Why are there more web design users using PHP instead of using Rails? Is
there an advantage using PHP over Rails?
Thanks
--
Posted via http://www.ruby-forum.com/.
2011 Jan 30
5
Named routes problem... more rails than rspec
Howdy,
I have emailed before about the inconsistencies I''m spotting when using
named routes/resource, but I think I''ve narrowed down the issue. It would
seem this has nothing to do with rspec per se, but more with how routing
works with rails.
If you have an object instance, that isn''t saved and you attempt to generate
a path for that item, even though the item may
2010 Apr 13
2
Advise sought: Upgrade from Rails 2.0.1 to current
I have upgraded from 1.2.6 to 2.0.1 and successfully passed all my
test and manual testing. Everything seems to be working correctly. My
application is pretty vanilla and so there where few complications.
Question is, should I do another point upgrade (and if so, which
point to upgrade to next) or is it safe (and prudent) to just go
straight on to the current version (2.3.x).
Advise would be
2010 Apr 02
2
Rails and PHP app under the same domain
Hello
I have a rails site in a domain like http://domain.com/ which is in
one folder the whole application and a blog (wordpress - php
application in another folder) under http://blog.domain.com/.
How can I do http://domain.com/blog/ shows up the php application?
Thank you!
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To
2009 Aug 04
2
Passenger, switching from development to production
It appears my http setup is working but I am getting an error when I try
to use a web browser to connect.
All I have done so far is to change the setting from what was working in
httpd.conf and move it to ssl.conf (adding some ssl things) and I am
using the same directory/set of files that was working for development.
The error...
Ruby on Rails application could not be started
Phusion Passenger
2010 Mar 07
1
Upgrading rails project - version 1.2.6 to current (2.3.5)
Can anyone please advise me what is involved in up grading a project
from version 1.2.6 to current (2.3.5). The project is pretty much
vanilla code and does not use plugins. Are there scripts that can do
the job (or pull out incompatibilities). Any websites or blogs that
point the way or should I just bite the bullet and rewrite? Reason for
wanting to upgrade is that I now do want to add features
2009 Jun 05
17
passenger on localhost
I installed passenger at home. How should I configure apache to make it
usable?
This was my last guess:
<VirtualHost localhost:3121>
ServerName 127.0.0.1
DocumentRoot /var/www/html/docsearch/public
</VirtualHost>
This gets by "apachectl start" without complaint, but I really haven''t a
clue what I''m doing ;)
Do I need to access it via a different
2009 Nov 28
3
When and Where does is the Method Override parsed?
I''m trying to figure out when and where the method override is parsed and
dealt with.
This works
curl ''http://www.whatsayye.com/questions/3.json'' \
-X "POST" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-HTTP-Method-Override: PUT" \
-d "{
2009 Sep 13
1
belongs_to + create_* = rails vs. console behavior difference = confused Pepe
Hi,
I have been battling something for a good hour and a half and finally
realized how to ''solve'' the issue but I am very confused as of why I
should do what I just did.
I have 2 classes:
class User
has_many :audits
...
end
class Audit
belongs_to :user
...
end
The way things need to work is to first create an audit and after the
audit is created a user that has