search for: classm

Displaying 2 results from an estimated 2 matches for "classm".

Did you mean: class
2008 Mar 14
3
ActionController <-> ActiveView code access ambiguity
Hi All! This is not a problem in general but i''ve just missed the point. If my application has a global state, which i have to use both throughout ActionController and ActiveView, then, where to place that state? E.g. if I do this: class ApplicationController < ActionController::Base protected def authenticated? !user.nil? end end then I can''t use that from any
2010 Jul 16
31
Added associations but don't see generated methods
...I eventually learned that the mental concept I had of their relationship should be express in Rails as: class Expense < ActiveRecord::Base; belongs_to :vendor; end class Vendor < ActiveRecord::Base; has_many :expenses; end http://rails.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html informs me that the following methods will be generated in Expense: vendor vendor= vendor.nil 1. Are my expectations correct? 2. What do I have to do to get them generated? (I can''t find any such methods defined anywhere.) Thanks in Advance, Richard -- You received this m...