similar to: Rails : Objects, Patterns and Practice

Displaying 20 results from an estimated 900 matches similar to: "Rails : Objects, Patterns and Practice"

2006 Feb 21
7
Self-referencial habtm relationship
Heyo! I am setting up a self-referencial habtm relationship with the users of my app. I am using Chad Fowler''s "Rails Recipes" to get me started, and everything works great with the join table "people_friends". I add friends by doing somebody.friends << somebodyelse. However, with my app, there is an approval process so my join table has columns person_id,
2006 Mar 06
4
Are views inheritable
Is it possible to use a child model''s controller to impliment it''s parents view before adding its own output ? possibly by the use of super ? _tony -- Posted via http://www.ruby-forum.com/.
2006 Mar 05
8
Model Inheritance, Mixins and Database design
I''m trying to understand how best to use inheritance and wonder if Rail''s Single Table Inheritance model too restricting. I have a model Companies who provide 1+ Services (HABTM relationship). I assume the best way to represent this is with a series of child models representing each type of service : ServiceType < Company. I want to return lists of companys for each
2006 Feb 26
5
Subversion | CVS | Sourceforge | OS X : Tutorials
Can anyone suggest some step-by-step tutorials for using CVS or Subversion on Sourceforge with OS X ? I''m a new to RoR and creating a Sourceforge project was recommended as a way of working and learning from/with others. But I can''t get over the hurdle of transferring what I''ve already build to csv.sourceforge or subversion.sourceforge. All my attempts generate
2008 Jul 08
3
undefined method `name' ...........
Hi Community.... I''m new in this game, so this might be a easy question, but I have done my google, without result, so I will try this.... I''m learning ROR, and I''m using Patrick Lens ''Ruby on Rails'' book. (This is written for ror 1.x - and I''m using NetBeans 6.1 - ror 2.x - this might be the problem...) But... I have made this
2006 Mar 05
9
Rails Development on a Mac Mini?
How many people out there are doing Rails development on a Mac Mini? I''ve been eyeing up the MacBook as well as the new MacMini trying to decide if I want to splurge. I''ve been doing very little Rails development thus far which makes the investment a little hard to justify. The Free Mini Mac ( http://minimacs.freepay.com/?r=16778073) offer seems like the best route but
2006 Jan 11
2
Good OOP and JS books / tutorials? Looking to teach my team
Can anyone recommend good books, online tutorials, or any other learning materials for Javascript - specifically Object Oriented Programming using JS? I want the rest of my dev team to be able to help me code in JS, specifically using prototype and scriptaculous. I''ve been using JS for so long, and I kinda "grew up" on OOP programming but my whole team is Coldfusion
2006 Feb 14
4
Fine grained access control
Hi, I''m building an application which is going to require quite fine grained access control. Deciding if a user is allowed to access an action will probably require checking quite number of different rules, so a simple role-based system won''t be flexible enough. The approach I think I will try first is, if it''s possible, to ignore permission issues inside the
2009 Oct 19
9
Can (should) each :user have his own table?
I was reading this article a while back http://www.sitepoint.com/blogs/2008/06/06/did-rails-sink-twitter/ and it got me thinking. If I wanted to set up my app so that each user has his/her own table, how would I go about doing that? "create_table :users" just creates a table in the database for a list of all the users (which I guess I''d want in addition to their individual
2006 Apr 19
3
Determining screen size and/or resolution?
What''s the easiest or best way to determine the screen size from within a controller or view in Rails? My "divs" look great at 1280x800, but not so hot on 800x600. I want to dynamically alter the layout based on the resolution. Any hints regarding screen size or alternate ways of handling this issue would be appreciated. Thanks! -------------- next part -------------- An
2007 Apr 02
19
Pref for beginner book: Wrox (Holzner) or Ruby for Rails?
I''m a beginner. I''ve done the apple tutorial, Agile ROR (the depot app, I stopped after that, a little to advanced with no base knowledge of Ruby), Why''s guide and my copy of Chris Pine''s book today. After Pine, I''m going to buy either the Wrox book or Ruby for Rails book. I did a search and there''s not too much on the Wrox book (Holzner)
2006 Feb 06
4
Relationship Question (STI)
My girlfriend and I have been dating for two years, and she just told me she has an STI... Actually, I currently have three different models, like: Dog, Whale, Monkey They all have some similar attributes, but, they are unique enough to break into their own models. I could use STI, but I think the table would just have too many columns. Now, I wanted to let the Dog''s, Whale''s
2006 Feb 06
6
ActionMailer - ROR Recipes - Multipart/alternative
I am using the SaltedHashLoginGenerator. and would like to send the e-mail in multipart/alternative format. By default my application is using forgot_password_en.rhtml template. I read in the ROR Recipes book "ActionMailer sees these templates, recognizes the pattern in their file names, and automatically sets the MIME type of the message to multipart/alternative and adds
2007 Jan 31
2
rspec + CakePHP
Hi, I am in a situation where I am going to have to rewrite a working Ruby on Rails application in CakePHP with PHP5. I have a whole bunch of specs written with rspec, and I was wondering if it would be possible to somehow use these specs to test the Models and Controllers that I am rewriting in CakePHP. I am going to be basically just exactly duplicating the Rails application, with identical
2006 Mar 08
3
migrations schema_info table, Rails Recipes Bug?
I have the rails recipes book and i was going through the migrations recipe. Everything seemed to work except for the last part in trying to do a rake migrate with a migration file version 1 and the schema_info version set to 0. Without the force attribute, the rake migration fails, as expected. So the recipe says to run this: ruby script/runner
2013 Aug 29
4
linkedin gem
Hi, I am following this post * http://www.sitepoint.com/ruby-social-gems-linkedin/* for using linked gem and API for getting profile and other stuff But at the end I am getting this error: => Booting WEBrick => Rails 3.2.13 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server Exiting
2008 Dec 20
3
undefined method `stories_path'
Hi, I recieve error "undefined method `stories_path'' for #<ActionView::Base:0x995b4ac>" when going to the view via site.com/stories/new The model is setup correctly, I can retrieve data from the db fine. I think it might be related to the helper but I have no idea where to start. It seems to think its failing on the first line of the view, i belive on the
2005 Apr 28
5
fcgi woes
Hi all I''m running rails on apache with fcgi under windows I have a module which I''ve included in one of my models, but if I change any code in the module, i have to restart apache in order for the changes to take effect. i tried some suggestions from folks in the IRc channel, namely to put RAILS_ENV = ''development'' in environment.rb but that doesn''t
2006 Mar 03
7
Best Practices question regarding views & controllers
Hi List! I''m reading the Agile book, as many online articles as I can, but there''s still some things that are just too hard to answer for yourself. In building my application, I often find myself putting code into my views of which I am not quite certain it belongs there. Where do you usually draw the line? Is it okay to, say, loop through an array of hashes that represents
2006 Mar 31
3
RJS templates outputting bloated code?
I''m an RJS newbie. I just did the tutorial at http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates, and then used wget to look at the output the RJS template generates. This is what I got: try { new Insertion.Bottom("list", "<li>Fox</li>"); new Effect.Highlight("list",{duration:1}); Element.update("header", "RJS