search for: railsapi

Displaying 12 results from an estimated 12 matches for "railsapi".

Did you mean: railsapp
2011 Jan 26
4
question about records count.
Hi. I have few models - user, task, file class User < ActiveRecord::Base has_many :tasks end class Task < ActiveRecord::Base belongs_to :user has_and_belongs_to_many :files end class File < ActiveRecord::Base has_and_belongs_to_many :tasks end I want to know files count for some user. is there some ''right'' way to do it without getting all tasks and looping
2010 Aug 30
5
Rails 3.0 API doesn't do word-wrap
Hi Guys, I just realize that on the API documentation the code snippet is overflowing off the screen. Is this an intended behavior? Or who should I contact to get this one fixed. You can see the screenshot here: http://skitch.com/sikachu/dw82n/screen-shot-2553-08-30-at-16.24.26 Thanks :) Prem Sichanugrist -- You received this message because you are subscribed to the Google Groups "Ruby
2010 Mar 10
2
"must be nil" validation?
Hey guys, is there a validation that essentially acts the opposite way of "validates_presence_of". That is, the attribute in question must be nil, or blank, non-existent. If not, what''s the best way to prevent a user from altering a web form attempting to submit data to a field that they should never have access to? Thanks! -- You received this message because you are
2010 Jun 17
3
RDoc 2.2.0 requirement
Looks like Rails 3 currently depends on RDoc 2.2.0 exactly, even though the latest version is 2.5.x. Why this specific version? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to
2010 Oct 03
7
Rails 3, Validates, Custom Message
..."some other custom message" obviously, it throws an exception. So the question is, in Rails 3, how to you give a simple custom message? Do I need to go through and set up a custom validation class for each validation, just to show a different message? I''ve looked at: http://www.railsapi.com/doc/rails-v3.0.0/classes/ActiveModel/Validations/ClassMethods.html#M003721 but it seems to show that a custom class would need to be set up for each attribute of my models? I''m sure there''s a shortcut, but have yet to find it. Thanks. -- Posted via http://www.ruby-forum.com...
2009 Aug 19
2
Create! Syntax
Hey All, Two questions. Firstly, what is the difference between create and create! I see that create is document in the api http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M002269 What is the difference between the two of these functions and where is the create! function defined. Also, What are the differences between these two calls? a) SomeModel.create!{ :property_a =>
2010 Apr 21
3
Anyone else notice that http://api.rubyonrails.org has been hijacked?
??? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at
2009 Dec 13
4
any use of flash causing "stack level too deep"
Is there any way to clear what''s in there? This happens any time flash[] is in my code. It can be setting or reading a value. I''ve tried commenting out all uses of flash in my code to get a few different pages to load, thinking this would clear the values, but no luck. If I get into the debugger, a p flash or pp flash will give a ''Stack level too deep'' error
2007 Apr 16
4
newbie :: Running script at client side
Hi all, I am newbie to Ruby and web programming as well. My show.rhtml is like, . .. ... <% require ''win32ole'' %> <% ie = WIN32OLE.new(''InternetExplorer.Application'') %> <% ie.visible = true %> <% ie.gohome %> ... .. . At server, when I access http://.../show it''ll open Iexplorer.exe as expected, but when I access same from
2009 Sep 25
12
uniqueness validation perplexity
I want to write a validate routine to check to enforce that a position must be unique in a category. (In another category, it doesn''t have to and shouldn''t need to be unique.) I write this code which works happily for new items: def position_in_category_not_unique @items = Item.find( :all, :conditions => [ "category_id = ? AND position = ?", category_id,
2011 Jan 11
9
Can I omit respond_with.
If I don''t want xml results but only html can I omit respond_with in some actions? For example index from: respond_with(@sectors = Sector.all) becomes only @sectors = Sector.all isn''t it? -- 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
2010 Oct 08
7
90% of documentation outdated?
I have been trying for a few days to set up a basic user registration/ login system with rails 3 and nearly every single piece of documentation is outdated. Restful_authentication has several git branches, none of which appear to result in a working installation. All of them leave me with "could not find generator authenticated". With Devise: "could not find generator devise"