I have the following models: User (id) Project (id) Permission (project_id, user_id) Thread (project_id) ThreadParticipation (thread_id, user_id)
I need some help building a table and then getting data from that table in Rails 3. Here\'s the break down:
In have 3 models here: projects threads (project_id) thread_participations (thread_id, read boolean) Right now I have a list of the user\'s projects, and the list shows how many threads are unrea
I\'ve been going through the documentation for getting ActiveRecord validation working with ActiveModel. For some reason I am not seeing any validation results returned.
I think the trouble is coming from the fact this is a custom Model. Error: undefined method `validates_presence_of\' for Calculation:Class
How can i set include_root_in_json to false for all my RoR models? 开发者_运维知识库I\'ve tried to set ActiveModel::Base.include_root_in_json = false inside application.rb, but it has no effect.Model
开发者_如何学PythonIs possible use ActiveModel without rails?. Is possible use ActiveModel in desktop application?With Rails 3 you can! Check out this post on Rubyinside.com Yes, for example using th
I have the following which works great: @request_thread 开发者_如何学编程= current_user.request_threads.new(params[:request_thread])
I have a model, which has and array of names and I want to ensure that only one document can have a given name. I\'m trying to write a custom validation to handle this. My custom validation and the mo
I\'ve configured my database.yml to point to my existing mysql database how can I generate models from it?