Search Results

Search found 4 results on 1 pages for 'mari'.

Page 1/1 | 1 

  • Undefined method for a belongs_to association

    - by marimaf
    My code: class User < ActiveRecord::Base belongs_to :university end class University < ActiveRecord::Base has_many :users, dependent: :destroy end and my model User has a university_id attribute. If I do University.find(1).users I get the list of users, but if I do User.find(1).university (and I checked that university_id is not nil here) I get: NoMethodError: undefined method `university' for from /home/mari/.rvm/gems/ruby-1.9.2-p290/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb :392:in `method_missing' from /home/mari/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.10/lib/active_record/attribute_methods. rb:46:in `method_missing' from (irb):14 from /home/mari/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.10/lib/rails/commands/console.rb:44:in sta rt' from /home/mari/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.10/lib/rails/commands/console.rb:8:in star t' from /home/mari/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.10/lib/rails/commands.rb:23:in <top (requi red)>' from script/rails:6:inrequire' from script/rails:6:in `' What am I doing wrong? I have another models and they are working just fine. Any suggestions? Thanks in advance

    Read the article

  • SQLAuthority News – Featuring in Call Me Maybe The Developer Way – Pluralsight Video

    - by pinaldave
    Is SQL boring? Not at all. SQL is fun – one has to know how to maximize the fun while working with SQL Server. Earlier I was invited to participate in the video Pluralsight. I am sure all of you know that I have authored 3 SQL Server Learning courses with Pluralsight – 1) SQL Server Q and A 2) SQL Server Performance Tuning and 3) SQL Server Indexing. Before I say anything I suggest all of you watch the following video. Make sure that you pay special attention after 0 minute and 36 seconds. What I can say about this. I am just fortunate to be part of the history in the making. There are more than 53 super cool celebrities in this video. In this just over 3 minute video there are so many story lines. I must congratulate director Megan and creative assistant Mari for excellent work. There are so many fun moments in this small video. Let me list my top five moments. @John_Papa ‘s dance at second 14 @julielerman playing with cute doggy The RACE between @josepheames and @bruthafish – the end is hilarious The black belt moment by @boedie @stwool relaxing on something strange! Well, this is indeed a great short film. This video demonstrates how cool is the culture of Pluralsight and how fun loving they are. A good organization provides an environment to its employees and partners to have maximum fun while they all become part of the success story. Hats off to Aaron Skonnard for producing this fun loving video. Well, after listening to this song for multiple times, I decided to give a call to Pluralsight. If you want, you can call them at +1 (801) 784-9032 or send an email to james-cole at pluralsight.com . What are your top five favorite moments? List it in comments and you may win Pluralsight subscription. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: About Me, PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

1