similar to: Routing problems for different formats

Displaying 20 results from an estimated 10000 matches similar to: "Routing problems for different formats"

2009 Jun 13
3
How Can I insert another column data into the CSV file when I use FasterCSV?
Hi, All, Suppose I have a CSV file, there is data in it. * Column 1 Column2 Column 3 Column 4 Row1 a b c Row2 a2 b2 c2* You know, the column 4 is no data Now, I would like to insert data to Column 4, after save, the CSV file will be: * Column 1
2009 Jun 10
5
uninitialized constant ActiveSupport::Cache (NameError)
Hi After having updated some GEMS I get `load_missing_constant'': uninitialized constant ActiveSupport::Cache (NameError) on starting the server of a freshly generated rails project. Before, I already had Rails 2.3.2 projects succesfully running, now all of them generate this error. These are my GEMS: actionmailer (2.3.2, 2.2.2, 2.1.2, 2.1.1, 2.1.0) actionpack (2.3.2, 2.2.2, 2.1.2,
2009 Sep 03
5
Rails 3.o
So... "Beginning Rails 3" is supposedly due Sept 2009 http://www.apress.com/book/view/9781430224334 "Rails 3 in Action" is due February 2010 (est.) http://www.manning.com/katz/ ... can we assume a beta release of Rails 3 is very close? Would like to invest in Rails 3 :)
2009 Jul 30
2
Can I turn off config.action_view.cache_template_loading in Production
I''ve got an app which users can edit the ERB templates for emails, the changes aren''t taking effect till the app restarts though because config.action_view.cache_template_loading = true I''ve seen various comments that suggest it has to be true when in Production for thread safety - is Rails actually running in a threaded manner yet? Surely this is a none issue at the
2009 Jun 29
2
Mongrel Malformed Request error - help!
I''ve just migrated my system over to a new macbook. I''ve been having a nightmare today trying to get the site I''m working on to work... All gems are in place, MySQL etc. However - I am stuck on this error form Mongrel: HTTP parse error, malformed request (127.0.0.1): #<Mongrel::HttpParserError: Invalid HTTP format, parsing fails.> The only thing it could be, I
2009 Jun 13
8
Removing routes to new, show, etc. in a model
Example model: demo --app ----Controllers ------application_controler.rb ------demos_controller.rb ----Models ------demo.rb ----Views ------demos --------index.html.erb (I want to keep this) --------edit.html.erb (delete) --------new.html.erb (delete) --------show.html.erb (delete) http://localhost:3000/demos/new (should not be a route) http://localhost:3000/demos/edit (should not be a route)
2009 Jun 14
6
Unable to make observe_field work
I can''t make it work. <%= text_field_tag :friend %> <%= observe_field :friend, :url => friendships_url, :on => :click %> <%= javascript_include_tag :defaults %> Raises the error:Can''t find variable Form. The generated html is: <input id="friend" name="friend" type="text" /> <script
2009 Jun 14
3
Rails I18n
Hi, I am trying to use i18n in rails. I want the language to be set first from params[:locale] (probably already in the url) then from the browser http header and lastly from the default_locale. Everything is fine. Now the problem starts, when I want to add a dropdown list to allow the user to change the locale. How do I force the page to reload with the new Locale? FYI, I tried using .js and
2009 Jun 13
2
Rake migration error
Hi, I am constantly getting an error when I use the rake command to do a migration or even use drop, this happened after I installed some plugins such as paperclip and seed-fu. The error is: rake aborted! uninitialized constant PKG_NAME /var/www/html/quote/Rakefile:10 The Rakefile looks like this: # Add your own tasks in files placed in lib/tasks ending in .rake, # for example
2009 Jun 14
5
Partials views and instance variables go nil
Hi everyone! Model: http://pastie.org/511290 Controller: http://pastie.org/511285 View new: http://pastie.org/511286 View _form: http://pastie.org/511284 When I hit submit button there''s an error for usuarios(users in portuguese) instance. It does not seems to save usuarios even though it seems to be posted by the form. Error: http://pastie.org/511292 Need some help here guys plz --
2009 Sep 01
9
Ruby on Rails Project Opportunities
Hi I am currently recruiting for a number of freelance contracts and permanent internal positions, both junior and senior, for Europe''s largest and most dynamic Ruby on Rails development projects, offering the chance to work alongside some of the industry''s leading figures in the Web 2.0 development community. Selected locations include Germany (eg Berlin, Munich, Hamburg,
2009 Jun 05
1
Slow/unpredictive response of post_form from rails lib
Hi friends, I''m facing a very strange problem... I consume a webservice from within my rails app. I''ve written a thin wrapper around the webservice using Net::HTTP.post_form However, when calling the API from within my controllers, the API calls randomly fail, complaining about timeout. But - when I wrote a simple iterative test (500 iterations), calling the same webservice
2009 Jun 06
5
Rake Tasks
Hi Everyone, I just need some further help clarifying a custom rake task I''m building and the logistics of how it should be working. I''ve created a custom rake task in libs/tasks called scraper.rake which so far just contains the following: desc "This task will parse data from ncaa.org and upload the data to our db" task :scraper => :environment do # code goes
2010 Sep 23
8
HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh
Hello, I''m interested in learning the correct/smart approach for implementing a web page with tabs and a content panel... When the tab is clicked by the user the tab''s content is fetched and inserted with jQuery... no page refresh... Example, Facebook, when you click Photos or Events, it doesn''t refresh the browser, just replaces the content with AJAX in the
2009 Feb 22
8
dynamically changing a form from POST/CREATE to PUT/UPDATE
For the life of me I can''t figure this one out, although I can''t find anyone else who''s attempted to do this, and probably with good reason. Context: blog using AJAX What I''m trying to do: when the user initially saves a blog entry, or when auto-saving, I want subsequent saves to not create a new blog entry Why I can''t just reload the partial: -
2008 Oct 26
3
Undefined method f_title
Hi, This is my migration: class CreateSampleForms < ActiveRecord::Migration def self.add_data SampleForm.create(:name => ''Default (Empty)'', :f_type => ''Default (Empty)'', :description => ''Use this template to create a blank form.'') end def self.up create_table :sample_forms do |t| t.string :name, :null =>
2011 Sep 06
8
Ajax and rails 3 UJS (jquery)
Hi, guys, I''m in the midst of moving an app from rails 2.3.8 to rails 3.0.9. Sadly, rails 3 no longer has javascript generators and I''m now forced to do more javascript. For my project, I have selected jQuery as the javascript framework for my rails 3.0.9 app. What I have done to have my app''s deletion link (for each item) trigger an alert box when the deletion
2008 Oct 26
2
use Prawn to generate pdf
Hello: when i use Prawn to generate pdf file for download, i got a blank pdf file, can someone tell me why? require ''prawn'' class DownloadController < ApplicationController def download_pdf send_data(generate_pdf, :filename => ''test.pdf'', :type => ''application/pdf'') end private def generate_pdf
2008 Dec 09
3
Problems with getting correct id from query involving two tables
I have a query that is intended to find all "transfers" based on a condition the uses a second table. In the controller, it looks like this: def find_protocols @transfers = Transfer.find(:all, :from => "transfers, protocols", :conditions => "transfers.protocol_id = protocols.id AND protocols.name = \"#{params[:protocol]}\"") respond_to do
2011 Sep 10
4
Finding HTML attributes with jQuery in Rails 3.1
I''m having trouble wrapping my head around the proper syntax to have jQuery (in an .js file) grab an HTML attribute and use the value of that attribute to load a partial. HTML fragment: <a href="/toggle" data-remote="true" section="training"> jQuery string (now setting a static partial, I need this to be dynamic)