Displaying 6 results from an estimated 6 matches for "cdemyanovich".
Did you mean:
demyanovich
2009 Jan 08
3
any eta on the rspec book?
Subject says it all...
Thanks in advance,
T
2007 Mar 29
21
a better "should have valid associations"
This is pretty much the same as last time around, if you recall.
Thanks to Wilson for converting to the new form. I''ve added a few
lines. Basically, it iterates over your model associations and does
two things.
- First, just try to call the association. Usually fixes speeling
erors or other such silliness.
- Second, try to find a record with an :include on the association.
This
2008 May 10
4
Newbie: lambda do...end.should change(Model, :count).by(1). Doesn''t work
Hi to everyone,
I''m an RSpec, and BDD in general, newbie so in order to learn I have
chosen to use my personal website as a tesbed.
I''m having difficulties juggling with mocks, and in particula with the
following code.
Here''s the controller action:
def create
@album = Album.new(params[:album])
if @album.save
flash[:notice] = "album saved"
2008 Aug 28
12
Rendering User attributes in XML
Let''s say an app has a User, and a User has many friends. Also, let''s
say the app authentication was built on the restful_authentication
plugin, and we have email and password in the Users table. The friends
controller index might look like this;
# GET /users/1/friends
# GET /users/1/friends.xml
def index
@users = @user.friends
respond_to do |format|
format.html
2008 May 06
10
Best way to implement?
So I''m new to all this Rails stuff and this is probably a database
design-related question to, but here it is...
Just for learning I''m trying to build a little real estate listings
application. Of course there is the listings model which will store
basic information like name, price, description, and all that jazz.
I''m to the point where I want to figure out how to
2008 Oct 22
1
Re: Returning a record's ID before the record is made?!??
In their example,
def create
@product = Product.new(params[:product])
@details = Detail.new(params[:details])
Product.transaction do
@product.save!
@details.product = @product
@details.save!
redirect_to :action => :show, :id => @product
end
rescue ActiveRecord::RecordInvalid => e
@details.valid? # force checking of errors even if products failed
render :action