search for: jjrussell

Displaying 7 results from an estimated 7 matches for "jjrussell".

2006 Jan 04
6
Ajax makes me cry
What is the difference in treatment between an ajax link_to_remote and a form_remote_tag This works great and adds a list item to an ordered list with id=form_results link_to_remote ("Help me please!", :update => ''form_results'', :url => { :action => :search_ajax_test }, :position =>
2006 Apr 20
1
multi level :includes for preloading objects from database
I am using :include => :assocation to preload data that I know will be used later in the UI over and over. However I have data like that that is an association of one of the associations. How would i preload that data too? e.g. grant has_many :people and person belongs_to :group I can''t include the :group association in a Grant.find because its not an association of grant,
2006 Jun 07
10
habtm "AND" find conditions
I have two tables and a join table for them e.g. books, authors in a many to many relationship (habtm) and a join table books_authors. I can successfully search for a book that has "author.id = 2 OR author.id = 4" but I am unable to search for "author.id = 2 AND author.id = 4" This is because the result of all the joins only has one author.id column so no single row has
2006 Apr 14
0
has_many through generated SQL column names incorrect
I just saw a post on this a few days ago but I''ve been searching and can''t find it again. I have a has_many, through relationship, but when I try to :include the join table in a Model.find(:all, :conditions => "join_table.column = something", :include => "join_table") the generated sql contains this where "grant_ownerships" is the join
2006 Apr 22
2
restrict specific model columns per user
Does anyone know a way to restrict access to specific columns in the model to specific users? My plan was to use the session hash to check the permissions of the logged in user in an overridden method of the same name as the model accessor I wanted to restrict, but the model can''t acecss the session. Any other ideas? -- Posted via http://www.ruby-forum.com/.
2006 Apr 10
1
random | in join statement with more than one :include
I have an ActiveRecord class that has several has_many,belongs_to, habtm, and the new has_many => :through relationships. Whenever I try a find(:all, :conditions => "some conds", :include [:relationship]) it works fine, but if I have find(:all, :conditions => "some conds", :include [:relationship, :other_relation]) it gets a sql error such as Mysql::Error: You
2006 Mar 10
3
Searching database using foriegn keys
I''ve read a lot about the ORM magic of Active Record which allows you to address a foriegn key object directly... e.g. I have a books and people table where books has a column called person_id If I get myself a Book object called mybook I get to the person object associated with this book by saying book.person which is awesome and I love it. My question, how can I say "Go