similar to: User has many topics or subtopics

Displaying 20 results from an estimated 200 matches similar to: "User has many topics or subtopics"

2007 May 05
4
autogenerated it (was ''Custom Matcher and NAME NOT GENERATED annoyance'')
> On 5/5/07, Luis Lavena <luislavena at gmail.com> wrote: > > describe "A User (in general)" do > > before(:each) do > > @user = User.new > > end > > > > it { @user.should have_many(:contest_public_votes) } > > it { @user.should have_many(:design_industry_user_interests) } > > it { @user.should
2011 Mar 01
11
Did rails or shoulda go insane on the inflection of 'taxes'?
I have a model ''xp_jurisdiction_taxes'' which rails (3) created correctly. Another model ''xp_jurisdiction_states'' has many :xp_jurisdiction_taxes. In my spec I am using a shoulda helper to test the association but get the following error. BTW, greped the whole project just in case and the string ''taxi'' exists nowhere. 1)
2007 Oct 19
11
Patch idea for rspec_on_rails
I recently wrote a matcher for testing AR associations which allows you to specify things like: Foo.should have_many(:bars).through(:bazes) I''m pretty darned proud of it and a couple of people have suggested that I should submit it to the rspec_on_rails project. Before I go to the trouble of writing out rdoc and fully spec''ing it, I just wanted to make sure this was
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
2006 Jun 06
2
Toggle css for display on page load?
In my layout I have a navigation bar with a few elements in it. The elements can be toggled on or off and thereby reveal or conceal some subtopics. I store the state of the toggle for the navigation elements in the session. When the page is reloaded, the navigation items are collapsed because the css for display: none is set by default in the html for the navigation elements. Is there a
2011 Jun 30
8
Error of DEPRECATION WARNING
Hi, I Have a strange error when i type the command "rake db:migrate " Can you help to solve this error or give me some advices the error is: DEPRECATION WARNING: Rake tasks in /home/joanne/Desktop/picto/vendor/ plugins/prawnto/tasks/prawnto_tasks.rake are deprecated. Use lib/tasks instead. (called from <top (required)> at /home/joanne/Desktop/picto/ Rakefile:7) thanks for help
2012 May 04
3
Database schema question
Im setting up a very basic rails app and have a question about the needed migrations & associations. Basically, my app is an occasion reminder service that emails users when occasions that they select or input are coming up. Occasions will be selected from a checkbox type list or alternatively manually input by the user (name and date of the occasion). Users can have_many occassions.
2011 Jul 11
36
has_many and belongs_to association
Hi , I want to test the one below but I got the problem belongs_to :name, :class_name => "Phrase", :foreign_key => "name" in my test context "test"do should have_many :phrases end in language.rb belongs_to :name, :class_name => "Phrase", :foreign_key => "name" error is 1) Failure: test: check has_many and belongs_to
2007 May 04
2
Custom Matcher and NAME NOT GENERATED annoyance
Hello RSpec users, Have been using RSpec since 0.8.2 (not too long ago, I must say). and been creating my custom matchers since was defined as "good practice". Also, auto-generated names for the examples is very helpful, I''m trying to take advantage of it. Since I often prior code/define all the "examples", I have created a few matchers to fulfill associations and
2011 Sep 14
1
rspec and should have_many through
Hi, Anyone can help me with rspec shoulda validations please. I can''t get the syntax right for these validations. Please correct me it { should have_one :tradable, :through => :trade_order} it { should belong_to :source, :polymorphic => true } it { should have_many :transfers, :as => :source } this is for Rspec 2, rails 3.1, gem "rspec-rails" gem
2006 Mar 24
7
Polymorphic associations?
I''ve read the stuff about polymorphic associations here: http://wiki.rubyonrails.org/rails/pages/UnderstandingPolymorphicAssociations But I''m not sure what exactly they are and what their advantage is. Are they the same as HABTM, but they''re "two-way"? Joe -- Posted via http://www.ruby-forum.com/.
2010 Oct 11
2
Why WOL? ( WAS: Re: Getting Wake on lan to work )
On a semi-related subtopic, Why do I want WoL? What concrete examples are there where it's useful? I understand what it is and how it works but the "why" has eluded me. -- Drew "Nothing in life is to be feared. It is only to be understood." --Marie Curie
2008 Jan 10
21
Shoulda
Hey, we''re currently using shoulda (http://dev.thoughtbot.com/ shoulda/) on a project and I saw some things that would be really nice to see in rspec, namely the should_ methods, and especially the should_be_restful method. Do these go against the rspec goals at all? Or could an ambitious programmer go to town implementing these for rspec_on_rails? Nathan Sutton fowlduck at
2006 Mar 22
10
Need for multiple acts_as_list
I have a model "Childmodel" that belongs_to two other models "Parent1" and "Parent2". "Parent1" "has_many :childmodels, :order => :positionp1" and "Parent2" "has_many :childmodels, :order => :positionp2". i.e. The child is independently positioned within each of its parents. This works fine and gets me the useful
2003 May 23
2
Please remove H.323 from Asterisk (was H.323 support is distrubuted with Asterisk (was Re: chan_oh323.so: Segmentation Fault))
Sheesh. I only joined here a few days ago and already there's a flame war. Look, to remove your name from the list is easy. It tells you where to go to manage your subscription down there at the bottom. If you want another mailing list, why not go to yahoo!! or topica and set one up, or set one up yourself. It ain't rocket science with mailman. Even an idiot like me has managed it.
2009 May 24
6
belongs_to not saving foreign key
Under Rails 2.3.2 using a completely brand new project, I have 2 models: class Author < ActiveRecord::Base # name:string end class Book < ActiveRecord::Base # title:string belongs_to :author # author_id end And a simple test where i create a Book with an Author using the belongs_to and then update the foreign key directly: require ''test_helper'' class BookTest
2006 Mar 21
2
Sorting by computed temporary field
Hey all, I''m rather new to Ruby and Rails (and not great with SQL), but I''m developing a ride sharing app and would like to be able to sort on something I don''t have stored. I have users, events, and rides, each of which has a zip code. Events have_many rides, and rides belong_to events. When an event is selected, I''d like to be able to show a list of
2015 Feb 28
1
[LLVMdev] RFC: PerfGuide for frontend authors
> On Feb 27, 2015, at 3:58 PM, Hal Finkel <hfinkel at anl.gov> wrote: > > ----- Original Message ----- >> From: "Philip Reames" <listmail at philipreames.com> >> To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> >> Sent: Friday, February 27, 2015 5:34:36 PM >> Subject: Re: [LLVMdev] RFC: PerfGuide for frontend
2010 Nov 16
1
Upgrade from RHEL 6 beta ?
I've installed rhel 6 beta to start playing around with clustering, gfs2 and ldap. Will I be able to upgrade to centos 6 final or I'll have to re-install ? Nicolas
2012 Jan 27
3
How to test the model dependence ?
Good morning, I''m new to rails and am having some basic questions in development. See if anyone can help me with a test problem. I need to test if my model "Procedure" is linked to the workflow. If not, the system must acknowledge an error. Below is the code that is in the file test \ unit \ procedure_test.rb. require ''test_helper'' class ProcedureTest <