search for: jemminger

Displaying 20 results from an estimated 20 matches for "jemminger".

Did you mean: hemminger
2007 Aug 21
3
Eager Loading
is there a way to always eagerly load an associated object so that you don''t have to put :include into every finder? class Product <ActiveRecord::Base belongs_to :user #always load user when product is loaded end Product.find(1).user.login #1 query since user was loaded with the product, same as if i used :include but I don''t want to have to specify it everywhere.
2010 Aug 10
3
ActiveRecord::UnknownAttributeError: unknown attribute: <script type
Has anyone seen this happening to their apps? I''m starting to get errors like this come across from one of my apps: ActiveRecord::UnknownAttributeError: unknown attribute: <script type The parameters being sent are: {"user"=> {"email_confirmation"=>"someone-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org",
2006 May 03
3
My Tooltips contribution
All -- I've been working on a simple tooltip widget and thought I'd release it into the wild. It builds on the features found in Prototype 1.5.0 RC0 and Scriptaculous 1.6.1. Very basically, it walks down a list of links and if they have id, href and title attributes, displays a tooltip on mouseover. Styled with a few lines of CSS and background images. You can demo it here:
2006 Aug 17
2
validates_associated bug?
i seem to be experiencing a bug where rails tells me that my organization object''s associated credit card is invalid (activerecord validation-wise invalid), when i know it to be valid. this happens only if i tell the organization to validate_associated :credit_card. i know the associated credit card is valid, because a) that credit_card object itself throws no validation errors, and b)
2009 Oct 14
2
How to configure every (postgresql) db connection?
I would like to set some db session variables specific to my application on the database connection that rails uses. They can be set by issuing an SQL command like "SET statement_timeout = 1000" once - it will be in effect for every subsequent SQL statement that uses this connection. So I tried to put the following into an initializer: ActiveRecord::Base.connection.execute("SET
2007 Apr 06
3
@ vs self in models?
i''ve seen both of these syntaxes before and have also used both in my own models: class Foo def get_bar @bar end end and class Foo def get_bar self.bar end end seemingly with no difference... i''m a nuby though so could anyone enlighten me to the differences if there are any? thanks, jeff --~--~---------~--~----~------------~-------~--~----~ You received
2010 Mar 28
3
ActionController::UnknownHttpMethod: ***, accepted HTTP methods are get, head, put, post, delete, and options
I''m occasionally getting exception notices with this error message: ActionController::UnknownHttpMethod: ***, accepted HTTP methods are get, head, put, post, delete, and options Anyone ever seen this or know what could be causing it? Thanks, Jeff -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this
2008 Nov 10
3
to_xml and helper methods
Hi, I have an array with objects and I want to generate an XML like: <objects> <object> <category_id>1</category_id> <helper-method>result 1</helper-method> </object> <object> <category_id>2</category_id> <helper-method>result 2</helper-method> </object> </objects> The helper
2008 Nov 13
5
Touch an ActiveRecord - timestamps
When I update an ActiveRecord, i would like to "touch" one of the related objects, that the updated record belongs_to, in order to update the timestamps on the parent record, although i don''t want to change any of the data in the parent. Whats the accepted way to do this? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You
2007 Apr 26
1
eager loading not working in production mode
i have an eager load query as such: @groups = ReviewQuestionGroup.find(:all, :conditions => ["review_category_id = ?", @review.category.id], :order => ''review_question_groups.position, review_questions.position'', :include => :questions) in dev mode, this works fine... i get results like @groups[0].questions.length = 13. in production, i
2009 Feb 24
3
Free SMS limit (using sms_fu)
I have been using SMS_fu but it seems too good to be true for production. I''m wondering, is there any sort of limit on email to sms depending on the carrier that you can send in a given amount of time? I remember reading somewhere that there is a limit to the number of free email to sms that you can send through AT&T in a given month. Does anyone know anything aobut this? I guess I
2009 Feb 18
3
wrong number of arguments (1 for 0)
Hello, I am new to ruby on rails. When I tried to create a session I am getting an error, ''wrong number of arguments (1 for 0)'', in my controller. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ArgumentError in CustomerController#add_to_cart wrong number of arguments (1 for 0) RAILS_ROOT: /project/bob_shopping Application Trace | Framework Trace | Full
2006 Aug 14
3
validating required fields during an update?
I have a User model with an email attribute. I''m using the following validations: validates_confirmation_of :email validates_format_of :email, :with => RFC822::EmailAddress, :message => "must be a valid address in the form user@domain.com" validates_uniqueness_of :email, :message => "address has already been taken. If you''ve forgotten your
2009 Oct 15
10
AJAX - how to have multiple select form sets implemented?
hi, there :) Consider a blogging application whereby a user is trying to add a new blog. He/she has to select a category. Upon selecting a category from a drop down box, a new sub categories drop down box will be created (hence an AJAX call). Got this implemented and it''s ok. Now, let''s assume that a given blog can have multiple categories (and subcategories). For example, a
2007 Apr 22
7
Getting a complete URL from Rails
Hello, I''m sending out an e-mail message to new users of my service. I want to send a particular link in this e-mail but I can''t figure out how to get a complete URL from the url_for method. Is there a way to do this without manually setting the host name? Thank you, -- Miles --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2006 Jul 19
2
can''t use symbols in redirect_to?
when i use something like: redirect_to :controller => :login, :action => :login i get an error: "undefined method `include?'' for :login:Symbol" is it not possible to use symbols with redirect_to? i thought it was a rails idiom to use symbols like so. thanks, jeff
2006 Jul 20
2
using association properties in form helpers
sorry for the noob question: how do i reference an association''s properties in a form helper? e.g. if i wanted to build a select list to choose a user''s address''s state (user.address.state), how would i hook that to the "method" of collection_select collection_select :user, ???, States.find(:all)
2008 Jul 21
1
Re: Observer
eh, like so? def after_create(model) generate_hotel_param_files(model.id) generate_hotel_setup_files(model.id) end def after_update(model) generate_hotel_param_files(model.id) generate_hotel_setup_files(model.id) end On Jul 21, 9:59 am, David Nguyen <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > Hi, > I have to make an observer if a
2006 Jun 09
4
WEBrick won''t start
without going into actual source code yet, here is the general scenario: i''ve pulled down a project from svn that a friend has been developing on a linux box... i''m on a windows box. if i run "ruby script/server", i get one line of output: => Booting WEBrick... then it dies and goes back to command prompt with no error messages. ...however, if i pull down the
2006 Jul 16
6
using collection_select
hello, supposing i have a User class that contains a Wibble class User < ActiveRecord::Base has_one :wibble end in my view i have <%= collection_select :user, :wibble, Wibble.find(:all), :id, :name %> when i post, i get an error like "Wibble expected, got String" how/where am I supposed to convert this posted wibble_id into a Wibble, or am I using collection_select