Could someone point me to a reference that explains how I would test
the order of elements on an HTML page?
For example, in RSpec I would like to verify that the content of one
element appears before the content of another.
response.should have_selector("p", :content => "Should appear first")
re
> skip_filter :authenticate_user!, :only => [:index, :show] unless
> @current_layout.nil?
I'm guessing that the unless statement is being parsed as an argument
to skip_filter. Try using parentheses like this:
skip_filter(:authenticate_user!, :only => [:index, :show]) unless
@current_layout.nil?
Hi everyone,
I have the following classes:
class User < ActiveRecord::Base
devise :database_authenticatable, :registerable, :timeoutable,
:recoverable, :rememberable, :trackable, :validatable
has_many :comments, :dependent => destroy
...
end
class Comment < ActiveRecord::Base
bel
Thanks, Tim
Actually, and I haven't fully tested this out yet, I think it's
simpler than that. Currently, I hvae the following:
class Comment < ActiveRecord::Base
belongs_to :user
belongs_to :commentable, polymorphic => true
...
end
and that seems to be working. I have another issue now that
Just in case this wasn't clear, I would like every comment to belong
to a user and only be editable by that user, but be associated with a
product type (Camera, Book, etc.). This is why I doubt the simple
class definition I outlined below would suffice.
Best,
Mike
On Feb 3, 4:26 pm, Mik
Hi everyone,
I'm sure the answer is out there and quite simple, but I haven't been
able to find it.
Suppose I have the following classes with polymorphic associations:
class Comment < ActiveRecord::Base
belongs_to :commentable, :polymorphic => true
end
class Camera < ActiveRecord::Base
has_
Duane,
Try running "rake routes" in order to see which controller is being
used for the create method. Hopefully that'll help narrow things down.
Best,
Mike
On Jan 31, 7:45 pm, Duane Morin wrote:
> So I've inherited a legacy application and I'm trying to work around the
> edges as I put an adm
e. I filed
a bug with the Devise team. Hopefully I'm not wrong and just wasting
people's time.
Thanks,
Mike
On Jan 23, 10:00 pm, Mike Kim wrote:
> Thanks Neener54, but I think I found the answer.
>
> Instead of running:
>
> > rails g model Blogpost
>
> I n
#x27;ll keep an eye open
> for you though and see if I can figure it out.
>
> On Jan 21, 7:41 pm, Mike Kim wrote:
>
> > I'm trying to use mongodb and postgresql simultaneously with Rails
> > 3.1. I believe I have everything set up correctly.
>
> > What I
I'm trying to use mongodb and postgresql simultaneously with Rails
3.1. I believe I have everything set up correctly.
What I'm interested in knowing is how to get rails to flip-flop back-
and-forth between mongoid and activerecord.
For example, if I want to generate an ActiveRecord model after us
Yes, I meant the wiki at http://wiki.rubyonrails.org.
Thanks, Colin and Frederick, for checking.
On Wed, Dec 14, 2011 at 1:15 AM, Frederick Cheung <
frederick.che...@gmail.com> wrote:
>
>
> On 14 Dec 2011, at 09:11, Colin Law wrote:
>
> > On 14 December 2011 03:13,
Hi everyone,
I apologize in advance for the newbie question, but I haven't been able to
view any content on the Rails Wiki pages. All I get are the Table of
Contents and the Discussions. I am able to view content when I click on
"View Page Source", but obviously this is not ideal.
I'm using Chrom
12 matches
Mail list logo