I\'m working with a controller that follows the resource_controller principle explained here. As you can see, I don\'t have full control on the (new, create etc...) all of them preload data, which m
With this model: validates_presence_of :email, :message => \"We need your email address\" as a rather contrived example.The error comes out as:
I have a model \"location\", which has many \"courses\" If I destroy a location, I\'d like the destroy request to be rejected unless there are no relationships between the location and any courses. I
I have a rails model which has 7 numeric attributes filled in by the user via a form. I need to validate the presence of each of these attributes which is obviously easy using
Apologies if this is a really common and/or ridiculous question; I swear I\'ve read over the documentation multiple times and everything seems so focused on ActiveRecord to the point they\'ve wandered
I have a method \"random_password\" that I\'d like to be able to access from multiple models in my rails 3 project. I\'m just wondering what the convention is for where to store it & how to provid
How do I get ActiveRecord attributes method functionality? I have this class: class PurchaseForm include ActiveModel::Validations
I use Rails 3.0.4 and RSpec 2.5. In my controllers I use named scopes heavily, for example @collection = GuestbookEntry.nonreplies.bydate.inclusive.paginate(
I have a Rails 3 model that includes a XML column in the database (IBM DB2). Whenever I try to retrieve this model in the XML format by @model.to_xml, I get as result the XML column escaped, something
I am using Ruby on Rails 3 and I am trying to build an ActiveModel this way: module Users # I use a namespace