similar to: @ vs self in models?

Displaying 20 results from an estimated 1000 matches similar to: "@ vs self in models?"

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)
2007 Oct 22
3
How to format data for time-series analysis
Hello all, I'm using R to visualize and explore the data produced by a software system. The software generates logs for many types of events. The software runs for days on end, and can possibly generate multiple events per second. What is the appropriate time format for year, month, day, hour, minute, second, millisecond? that R can properly interpret (using zoo? or ITS?) I'll have
2009 Jul 20
2
HELP: BRUGS/WinBUGS/RBUGS Response is a combination of random variables
Hi, Is there anyone know if BUGS language allows the combination of variables as response such as Y[i] <- a*X1[i]+b*X2[i] Y[i] ~ dnorm(c,d) It seems doesn't work in my model. The problem is between two ######. The error message is > modelCheck("BayesBioMarker.BUGS") model is syntactically correct > modelData(paste("BUGS_data.txt",sep="")) data
2007 Jun 12
15
facebook api
hello guys, i want to use facebook api for my app any body have any idea.... -- Arun Agrawal --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send
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 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",
2007 Jul 04
1
Edge Rails required for ActiveResource
Just wanted to make sure I''m not missing anything here... I''m trying to use ActiveResource and I was trying to avoid using Edge Rails. However, since ActiveResource depends on the edge version of activesupport, I appear to be stuck going edge... have flailed around for a while trying to get ActiveResource to work with 1.2.3 but it just ain''t happening. Am I right? Gotta
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 Aug 26
2
ror app with advanced rspec?
Hi! Can anybody link to some ror based project what is using rspec, so nuby as me can learn from it. So it should have updated and practising advanced rspec. After reading last threat about "testing behaviour or testing code?", I just realised that I would definitely learn something from app like that. Some casual googling didn''t help me this time. Thanks! Priit at
2006 May 24
1
send email from form input
OK, I am a Rails nuby, so please keep that in mind. I want to have a form on a page where users can enter in their email address in one field, a message in a text area field, and when they click "submit" the message should be sent to a static email address, say me@mysite.com. I have read the "HowToSendEmailsWithActionMailer", but I am not sure this is exactly what I need.
2006 Jan 10
2
the dreaded error Before updating scaffolding from new DB s
Hi I am pretty sure that this is a common nuby problem but I cannot figure it out i try to run scfaoldong and get a error "Before updating scaffolding from new DB schema, try creating a table for your model" I have mysql set up and created the tables etc. Derek -- Posted via http://www.ruby-forum.com/.
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
2006 May 03
2
Conditional statement style
This is a bit of a nuby question methinks but i''ve had a play/search around and it''s just bugging me now :0) Say I have a conditional statement, testing a variable against a number of values. The first way i did this is like so: if myvar != "" and myvar != 0 and myvar != nil # .. code end This seems a bit messy - is there neater way of doing this? I thought of:
2007 Aug 28
3
How do you keep mocks updated without pain?
Hi! I know you must be answering a lot of basic questions, sorry about that :-) However I have not get it, how do you keep mocks updated without pain? I reached to the point where mocking things for view. I spec model-controller-view using "correct doc" way mocking-stubbing (plus I should run integration test to be sure that everything really works together). Now, when I want to
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
2006 Mar 01
2
error: uninitialized constant
total rails nuby here. I have a table "thumbnails", hence the model Thumbnail. I''m extending the Thumbnail class with a few constants needed for thumbnail cropping: class Thumbnail < ActiveRecord::Base SOURCE_FILE_PATH = "path/to/source" TARGET_FILE_PATH = "path/to/target" TARGET_WIDTH = 100 TARGET_HEIGHT = 100 end Now, in my controller
2006 Jan 05
2
Agile Depot Tutorial Help
anyone can explain me why in the Agile Depot Tutorial application they use i.product_id to find if a product already exist in the cart, because the cart contains items, each of them references a product. I tried i.product_id like in the tutorial and i.product.i all of these 2 notation works , but i find the second seems more clean??? isn''t it. Any explanation will be fine Regards
2006 Jun 07
2
script/generate scaffold pluralizes class names
Hi everyone, I''m a rails & ruby nuby, and this is my first post to the list. Here''s my environment in case it helps diagnose my problem: Ruby version 1.8.4 (powerpc-darwin8.6.0) RubyGems version 0.8.11 Rails version 1.1.2 Active Record version 1.14.2 Action Pack version 1.12.1 Action Web Service version 1.1.2 Action Mailer version 1.2.1 Active Support version 1.3.1 I did