similar to: what is the best coding practices for Rails (model View Controller )?

Displaying 20 results from an estimated 30000 matches similar to: "what is the best coding practices for Rails (model View Controller )?"

2010 Aug 08
1
Why Rails 3 installation is so pane full
Hi all Why Rails 3 installation is so pane full...? I am using fedora 10, ruby 1.8.6 rails 2.3.5/2.3.8 Now want to upgrade to rails3 i tried so many links... but nothing find essay.. for Rails 3 problem in ruby installation please suggest good links ... Thanks.... Regards Shyam 971-618-9650 shyam.heroku.com -- You received this message because you are subscribed to the Google Groups
2008 Oct 14
2
best-practice for programmatically using rxml generated from controller/view? (or 'how can I view a view from a model')
Hey Guys, Here''s the scenario: I''ve got vendor-specific XML I need to create and then POST it somewhere. It sounds easy enough, but I''m running into issues when it comes time to actually use the XML. Trying hard to stay within the MVC pattern I: 1) Create a controller which loads the models I''m about to turn into XML 2) Create an rxml view which renders the
2006 Jul 17
6
Best Practices: Splitting the "view model" from AR model
All, I''m starting to see view state information creeping into my model class. For example, I have text fields in my view that need to be set a certain way depending on whether or not a checkbox is checked. And while the values of these text fields ultimately do represent database columns that are related to the backing AR object, the text_field values also represent attributes on a
2010 Feb 22
6
Rails Parser
Hi all I am a new Ruby on rails developer having one plus exp... I like Rails most... and enjoying making applications I listened from some one that rails application in production mode ... are more error porn... This is due to the Parser used in rails ... is complicated to understand Some Time it generates some unknown error that is difficult to solve .... so i want to know is it really
2006 Apr 04
2
Sharing controller code between views - best practices?
Hi, I have controller code that needs to be shared between multiple different user type views and want to know what is considered ''best practice'' or what other people are doing out there. Example: I have admin users, salesperson users, and possibly another type of user. They all need code to add/edit/delete a property - and other abilities. The code would be identical(in
2010 Dec 11
3
Why doesn't Heroku show the Rails default page?
Following chapter (1) of the Ruby on Rails tutorial: http://railstutorial.org/, I was able to successfuly push the application to "Heroku" using: > git push heroku master But, when I open the website, I get a page with the following: App crashed This application is temporarily offline. If you''re the administrator of this app, please check your heroku logs for the backtrace.
2010 Feb 24
5
gem install rmagick --local
Hi all i copied rmagic gem in my local system cd rmagick-2.12.2.gem bash: cd: rmagick-2.12.2.gem: Not a directory *[root@localhost shyam]# gem install rmagick --local* Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb checking for Ruby version >= 1.8.5... yes checking for gcc...
2012 Jun 28
2
Best practice on Javascript and rails
Hi, I get constantly nervy whenever trying to implement any javascript / jquery in rails, basically because I''m not sure where to put things in the project! I know the people at rails have thought long and hard about how to best structure an app, so I''d like to learn the correct way. I''m using rails 3.2, ruby 1.9.3 ///////////// 1st situation - using a gem to include
2006 Feb 11
0
Ajax/View Best Practices
So, I''m rolling along learning Rails, finally starting playing with Ajax, and am embarrassed I waited so long because it''s so darn easy in Rails. Anyway... I did run into a problem. I''m trying to make a basic dynamic list, with a text box at the bottom where you can add an item into the list, and delete links next to each item to remove. I want to be able to show
2011 Jan 06
1
View specs - best practices
Howdy, I''m trying to test some mailer views (which is no different to normal views in terms of specs)... ran into the following problem... In adherence to the "one expectation per ''spec''"... I''m trying to write the following describe "auth/mailer/signup.html.erb" do before(:each) do @user = Factory.build(:user) assign(:user,
2011 Sep 26
1
Supported Database List for rails 3.x
Hi all, Can we list all the supported databases with Rails 3.x ? -- regards, -Shyam -- 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
2006 Jul 24
8
Views in one controller reaching out to other controllers (best practices)
Hello all. For the purpose of my question, let''s imagine we''re building some search functionality. You''re a sales person (you poor sap). And you''re hanging out in the SalesCenterController. You need to do a search for available productions; you''ve decided to be cool and use Ajax. Do you... a) Make a remote call to an action in your current controller
2010 Nov 16
4
view.should render_template best practices?
I''ve been looking for the definitive answer for months now, and the RSpec book doesn''t touch on it at all: How do we now handle stubbing out rendering of partials in view specs in RSpec2? I have a large (35K+ lines of views and related specs) that I''m trying to upgrade to Rails3/RSpec2. My views use partials pretty extensively and this issue is a huge blocker for me.
2007 Dec 19
3
multi-model search best practices
Hi folks. If I am indexing ModelA and ModelB and I want to search both of them, I usually just pick one arbitrarily and use it for #multi_search. Is there a slicker pattern, regarding from which model to invoke #multi_search? Can it be invoked directly from the Ferret library? Has anyone put together some sort of "dummy" search class? Thanks for any ideas. John
2012 Jul 14
0
Rails Assets Best Practices
Could use some help assembling this: http://stackoverflow.com/questions/11483819/rails-assets-best-practices -ofer -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/_BmFLbEP7GAJ. To post to this group, send email to
2010 Aug 22
0
Ask for best practices on rails-bestpractices.com
Hi http://rails-bestpractices.com added a new feature, asking for best practices, it allows users to ask for a best practice about any rails related work, such as "How to detect N+1 queries?" and "How to upload a large file with progress bar?". Then everyone can post your answer with your own best practice solution to the questions. Check it
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
2013 May 01
3
PG gem behaves strange. It requires live DB connection to only generate a model. How to turn it off?
I used MySQL as a backend before. Now I had to move to PG since Heroku doesn''t have MySQL and forces everyone to use their Heroku-PG database. But PG virsion of Rails works diffidently. I cannot generate a model without PG server running: >> C:\ruby\Heroku\App>rails generate model Products >> >> C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-
2010 Dec 01
10
How to Redirect from http://mysite.com to https://www.mysite.com on Herok
Hello I''m looking to learn how to redirect all non-www (mysite.com) to https://www.mysite.com I tried the following: class ApplicationController < ActionController::Base before_filter :check_uri def check_uri redirect_to request.protocol + "www." + request.host_with_port + request.request_uri if !/^www/.match(request.host) if Rails.env ==
2013 Jan 02
0
Telecom Best Practices
OK. I'm getting out the fireproof suit because it's coming and my hackles have been raised by a number of comments on the list of late. Disclaimer: No disrespect intended to the individuals of any *specific* thread. I'm a little frustrated over energy wasted on pedantic top/bottom posting crap rather than understanding the technology and industry best-practices which have been