similar to: which views are rendered for an URL

Displaying 20 results from an estimated 10000 matches similar to: "which views are rendered for an URL"

2011 Jan 05
2
real time R
Hi, We're using R in an application where asking for a probability of an event takes about 130ms. What could we do to take that down to 30ms-40ms? The query code uses randomforest, knn. -- M.
2009 Mar 08
3
scaling full text indexing(ferret vs solr vs hyperstraier)
Hi, Does any have experience scaling full text search in RoR? Right now our project is running a simple setup with ferret and acts_as_ferret. We are thinking about deploying a feature that would send 50x more search requests. So we probably have to rethink our solution. How do services like search.twitter.com (the former Summize) use? Or in what direction should I look? -- Thanks, M.
2010 Apr 02
2
Uncaught exception failed to allocate memory
Hi! I have a recipe that''s supposed to download ree from a master and install it. It looks like: # Install ree file { "/root/puppet-setup/ruby- enterprise_1.8.7-2010.01_amd64.deb": source => "puppet://$servername/files/ruby- enterprise_1.8.7-2010.01_amd64.deb", mode => 0644, owner => root, group => root, notify =>
2012 May 21
4
Rendering partial views with ajax calls in rails 3.1
I''m starting now with rails, and i have simply question i think. I need to render two partials in one ajax call: I have the following controller: # GET /hosts/1 # GET /hosts/1.json def show @host = Host.find(params[:id]) respond_to do |format| format.html #show.html format.js format.json { render :json => @host } end
2009 Jul 18
2
Sharing controllers/models within a view
Hello, please forgive me if this answer is obvious! I''m new to Rails this week. I have two database tables, and the associated scaffolding, controllers, models and views. The first is service_provider, which holds a list of service providers. The second is service_provider_countries which is a table of countries (obvious perhaps). In views/service_providers/new.html.erb I have a form,
2011 Mar 09
1
" instead of " in js code rendered by erb
Having problems rendering javascript in erb file. Thanks for suggestions. //layout erb file (function() { ... var widget_properties = {}; <%= content_for?(:extend_widget) ? "widget_properties = " + yield(:extend_widget) : '''' %> ... })(); //view erb file <% content_for :extend_widget do %> extend = { _init: function() {
2010 Nov 06
2
Rails show views from a different controller
In my Ruby on Rails application I have a page Aboutus - This has a Controller and View. Has no model. I have a Comments model (generated by the rails generate scaffold comment) - This has a Controller, view, model On my Aboutus page, I want to show the "Comments" from the comments model, so I am thinking of using the Comments index action (to list comments) and new action (to create
2011 May 20
5
views w locale default template
[RAILS3] I hesitate on how handling the locale view templates to default to one language only .. sending admin emails will go only to one locale ''en_GB'' should I set it up into the template name and set I18n.locale to ''en_GB'' membership_renew.en_GB.html.erb OR whatever locale is used , if I have : membership_renew.html it will be the default ? --
2008 Nov 10
3
to_xml and helper methods
Hi, I have an array with objects and I want to generate an XML like: <objects> <object> <category_id>1</category_id> <helper-method>result 1</helper-method> </object> <object> <category_id>2</category_id> <helper-method>result 2</helper-method> </object> </objects> The helper
2008 Jan 17
4
multiple views, and some routers
Hi, I''m new to Rails (just a Java Programmer tired of having to configure a lot of xml''s and mapping classes just to make a simple page (...)) anyway, I''m experiencing some problems with routers, i''ve created a new project using Rails 2.0 and created a scaffold for users. so i have the following: users/new.html.erb ... (and the other pages created by the
2008 Aug 08
2
template.expect_render fails when partial is rendered from a helper
My spec; describe ''subnav rendering while logged in'' do before do template.stub!(:logged_in?).and_return(true) template.stub! (:current_profile).at_least(:once).and_return(mock_profile) end def do_render render "/homepages/show.html.erb" end it "should render the logged in partial for homepages" do
2011 Aug 28
3
rspec-rails render_views doesn't render layouts? / how to check flash isn't rendered
I''m trying to test that "static" pages (they''re ERB, but get cached), generated through rails, don''t render any stray flash notices left over by the authentication system (Devise) or wherever else. I''ve tried writing this controller spec, but it appears that response.body only renders the template, not its layouts? describe "so that static
2008 Jan 23
2
integrate_views is not executing my views
I wanted to use "integrate_views" as Ryan explains in his RailsCast #71 (http://railscasts.com/episodes/71) ...but I can''t get it to work: the view code in not executed I looked everywhere but I can''t understand what I am doing wrong. Here is what I did: I created a new application from scratch (Rails 2.0.2), added rspec and rspec_on_rails plugins, and run
2008 Feb 07
11
Multiple Views within subfolders
Hi, I am creating an application in which I am allowing users to have customized views of a form. These forms do not have to be customized at this point by the user, but will for now be customized by us, and uploaded to the server. My idea was to take the similar approach done by the plug in acts_as_attachment, and, have a default layout stored in the normal views/controller_name folder, but
2008 Apr 10
3
option_groups_from_collection_for_select with a ActiveRecord::Base single object
Rails documentation gives examples of using option_groups_from_collection_for_select with two tables/objects. How could it be done with one? Example that almost works: I have a form to enter address from both the United States and Canada. It has the following: ====new.html.erb==== <%= select_tag( :state, option_groups_from_collection_for_select( State.countries, :country,
2007 Mar 08
2
Rendering a view from a model
Hi peoples. I have the following class method in a Rails model, in which I retrieve some objects from the DB... @bubbles = Bubble.find(:all, :limit => 30) # What is the limit? open( "public/xml_data/main_data_feed.xml", "w" ) { | l | l.write ERB.new( IO.read( File.join( RAILS_ROOT, "app/views/rssfeed/bubbles.rhtml" ) ) ).result } When I attempt to run this
2006 Jun 24
2
error log for views?
This may be a bonehead question, but when I have some error in a view I''m testing, the server spits out a generic page: "Application error Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html" This is pretty unhelpful when I''m debugging. Is there an error log for Rails overall
2006 Apr 28
3
Handling errors - incorrect value entered in url...
I have many "edit" actions in my project. If the url is like http://localhost/project/3/edit and someone enters http://localhost/project/3333333/edit the edit action will fails because it cannot find a project with id of 3333333. To combat this I am adding to every action like edit: rescue redirect_to :action => ''index'' flash[''errors''] =
2010 Aug 13
11
Link to remote and the equivalent in Rails 3
Hi WOW! Is Rails 3 another interesting learning curve. Just when I think I have a general working knowledge of Rails 2 ... things change. I''m trying to replicate the following in Rails 3: <%= link_to_remote image_tag("creditcard.png", :border => 0), :url => {:action => :make_payment, :type => "Credit", :id => @appt.id },
2009 Mar 29
2
after_create and after_save
Hi, AFAIK after_create is called after_save if the entry does not exist in the DB. Is there a way to tell if a specific model is new or not in after_save? I have to do something like: def after_save add_to_history ''save'' end def after_create add_to_history ''create'' end However after_save is called when creating too. -- cheers, M.