Search Results

Search found 7350 results on 294 pages for 'rspec rails'.

Page 66/294 | < Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >

  • In Ruby on Rails, routes.rb, if map.something will create something_path and something_url, does map

    - by Jian Lin
    In Ruby on Rails, routes.rb, if we create a "named route" map.something ":a/:b", :controller => 'foobar' it will also create something_path and something_url which are two methods usable in the controller and in the view. Does map.connect create something like that too? Otherwise, isn't map.connect somewhat disadvantaged in this way? I checked that connect_path and connect_url both aren't created automatically.

    Read the article

  • Redirecting to another controller in Rails

    - by Vitaly
    Hi, I'm trying to redirect from one controller to another in Rails and I am getting this error: undefined method `call' for nil:NilClass The code is pretty simple (in def create method): @blog_post_comment = BlogPostComment.new(params[:blog_post_comment]) respond_to do |format| if @blog_post_comment.save flash[:notice] = 'Comment was successfully created.' redirect_to(@blog_post_comment.blog_post) else render :action => "new" end end Save goes ok, the value gets into the database. How can I work around the redirect fail?

    Read the article

  • url optimization in rails?

    - by piemesons
    Hello I want to create seo optimize url in rails.Same like done in stackoverflow. Right now this is my url http://localhost:3000/questions/56 I want to make it something like this:- http://localhost:3000/questions/56/this-is-my-optimized-url i am using restful approach. is there any plug-in available for this.

    Read the article

  • Store CSPC and UPC Codes in Rails

    - by Kevin Sylvestre
    What the best way to store CSPC and UPC codes are in Rails? I used integers with SQLite, but had overflow issues when moving to production. I've since switch to strings, but am not sure if a better generic datatype (needs to support SQLite, MySQL and PostgreSQL). Thanks.

    Read the article

  • rails checkbox has_many is hunted

    - by sebajb
    check_box is hunted in rails; but I would like to select some objects and save the relationship to the database anyways. When I debug the code all I see is the value='on' instead of the value I want to save. Any Help or tutorial would be appreciated.

    Read the article

  • Sharing authentication between forum and main CMS in Rails

    - by Newy
    I have a Rails forum product that resides under the subdomains of my customers (i.e. http://forum.customer.com). Their main site has a CMS and an authentication system, and my forum product has a separate authentication system. Is there an elegant way to have "cross-signins" across these systems? I want someone already logged into the main CMS to seamlessly (as possible) transition into my product.

    Read the article

  • Redirection in Rails

    - by Cyborgo
    Hi, I have a small question regarding rails. I have a search controller which searches for a name in database, if found shows the details about it or else I am redirecting to the new name page. Is there anyway after redirection that the name searched for to automatically appear in the new form page? Thanks in advance.

    Read the article

  • How do I see the whole HTTP request in Rails

    - by akafazov
    Hi, I have a Rails application but after some time of development/debugging I realized that it would be very helpful to be able to see the whole HTTP request in the logfiles - log/development.log, not just the parameters. I also want to have a separate logfile based on user, not session. Any ideas will be appreciated! Angel

    Read the article

  • Ruby On Rails on Windows - Linux VM or dual boot

    - by CocoB
    I am a windows developer currently getting into Rails. While you can develop on RoR Windows, it's not the ideal experience. Things are glitchy and running cucumber tests are painfully slow. So, would I be able to have a decent dev experience running Linux in a VM for doing RoR development, or should I bite the bullet and just do a dual boot - Windows 7 / Linux?

    Read the article

  • Rails routes matching query parameters

    - by Harry Wood
    Rails routes are great for matching RESTful style '/' separated bits of a URL, but can I match query parameters in a map.connect config. I want different controllers/actions to be invoked depending on the presence of a parameter after the '?'. I was trying something like this... map.connect "api/my/path?apple=:applecode", :controller = 'apples_controller', :action = 'my_action' map.connect "api/my/path?banana=:bananacode", :controller = 'bananas_controller', :action = 'my_action' For routing purposes I don't care about the value of the parameter, as long as it is available to the controller in the 'params' hash

    Read the article

  • Getting "uninitialized constant" in Rails app

    - by Robert McCabe
    I'm new to Rails and feeling my way, but this has me stumped. I moved some constants to a separate module ie: module Fns Fclick = "function() { alert(\"You clicked the map.\");}\n" ... end then in my controller added: require "fns" class GeomapController < ApplicationController def index fstring = Fns::Fclick ... end but when I run the server I get: uninitialized constant Fns::Fclick what am I missing?

    Read the article

  • Javascript error in rails app (locally run)

    - by tesmar
    Hi, I am trying to move a development environment from production to my local machine (Ubuntu), and when I get the code up and running on my box, the site works in rails but I get this JS error: Permission denied for http://ad.doubleclick.net to call method Location.toString on http://localhost:3000. Line 0 Do you have any idea how to fix JS problems, or should I disable the ads in development?

    Read the article

  • Apache serving wrong Content-Type for Rails files

    - by NudeCanalTroll
    Apache keeps serving up my Rails files with a Content-Type of 'text/plain' in the header. I have mod_mime installed, a mime.types files with all the correct MIME assignments, and the following code in my configuration. Any thoughts? DefaultType text/plain <IfModule mime_module> TypesConfig /etc/apache2/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz </IfModule>

    Read the article

  • Rails - Find Condition of two model fields

    - by ChrisWesAllen
    I'm trying to find the results of a model where it queries as the result of two conditions. I have a search tag that looks for Model.find(:all, :conditions => "name LIKE params[search]") but I'd like for the search to find all records where "name LIKE params[search] or description LIKE params[search] . Is there any way to add an OR into a condition in rails? or should I make an if statement?

    Read the article

  • cakephp or ruby on rails

    - by dole doug
    Hi there I've put some of my free time on reading/learning about cakephp but now I'm wondering if will not be better to switch completely to ruby on rails. Can you give me the good and the bad of those tools, when is about web-development? many thx

    Read the article

  • Rails on IronRuby (IIS 6)

    - by Fossmo
    I'm trying to get Rails running on a IIS 6 webserver using IronRuby, but without success. I have followed this webcast and got it running on IIS 7, but can't make it work on a IIS 6 server. I need some help to get this to work. Any ideas?

    Read the article

  • Rails : Scaffold works for the first, but not for the second table

    - by Sylario
    I am using aptana radrails empty rail project : scaffold Article titre:string body:text categorie_id:integer ordre:integer Migrate - it works fine scaffold Categorie titre:string ordre:integer It generate the files but when i access http://127.0.0.1:3000/categories i have the following error : NameError in Categories#index Showing app/views/categories/index.html.erb where line #22 raised: undefined local variable or method `new_categorie_path' for # Extracted source (around line #22): 19: 20: 21: 22: <%= link_to 'New categorie', new_categorie_path % i deleted recreated my whole rails project a few times, changed categorie with another name but it keep failling. Why ?

    Read the article

  • Rails, destroy if blank

    - by Joseph Silvashy
    This might sound odd, but is there a 'Rails way' to have a model destroyed if a certain attribute is blank? Say I have a model like tags with just a name attribute or something, if the user edits the tag and deletes all the text out of the name field in the form I'd like the model to just be deleted. I'm aware of the reject_if method, but that doesn't seem to work.

    Read the article

< Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >