Search Results

Search found 9437 results on 378 pages for 'rails newbie'.

Page 55/378 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • best way to receive email for multiple domains with multiple user accouts into rails app

    - by rick moss
    hi all I have a cms that runs on multiple domains and therefore needs to pull emails into the app for multiple email addresses. I have setup rackspace email for a hosted email solution and am trying to find the best way to pull the emails into my app from all the mailboxes. Should i be using pop3 or imap ? should i be pulling into a que system then into rails app ? Is there a gem / plugin for this ? thanks alot for help in advance Rick

    Read the article

  • Getting rails application from github to debian server

    - by Micke
    Hello. I've been developing my first rails application on my windows computer. But now i have been setting up a debian server with nginx and passanger. I've been using Github to keep track of my application and now i am wondering how i can get the Github version of my application to the debian server and put it in production mode? Anybody that have a good guide about this or something?

    Read the article

  • Ruby On Rails Paths

    - by dweebsonduty
    I am having trouble with paths in ruby on rails My Routes: map.resources :companies do |company| company.resources :customers do |customer| customer.resources :jobs end end Currently I am creating the paths by hand: <td><%= link_to 'Show', "/companies/#{params[:company_id]}/users/#{user.id}" %></td> <td><%= link_to 'Edit', "/companies/#{params[:company_id]}/users/#{user.id}/edit" %></td> For some reason I cant figure out how to get new_company_user to work I keep getting errors. The routes are all there I just need help with dynamically creating them by using the API

    Read the article

  • Rails authentication plugin recommendation

    - by Tam
    Hello, I would like to add authentication to my Rails app. I came across few plugins that do this: acts_as_authenticated, restful_authentication, Authlogic...etc I haven't seen an article that describes differences, advantages and disadvantages of using each. Can you help with that? which one do you use and why? Thanks, Tam

    Read the article

  • Rails: find by day of week with timestamp

    - by Sleepycat
    I need to grab the records for same day of the week for the preceeding X days of the week. There must be a better way to do it than this: Transaction.find_by_sql "select * from transactions where EXTRACT(DOW from date) = 1 and organisation_id = 4 order by date desc limit 7" It gets me what I need but is Postgres specific and not very "Rails-y". Date is a timestamp. Anyone got suggestions?

    Read the article

  • collaborative filtering in rails

    - by holden
    I'm looking for a solution for collaborative filtering in rails or even possible examples. So far I have only found acts_as_recommendable which looks useful but I noticed it hasn't had any updates in the last 2 years. Does anyone know of any other solutions and/or examples?

    Read the article

  • Running shell scripts with sudo through my Rails app

    - by nfm
    In my Rails app, I have some functionality that interfaces with the server's OS. I've written a bash script, put it in my lib/ subdirectory, and can run it from my controller. However, some functionality of the script requires superuser privileges. What is the most sane way to run this script securely? It is being passed arguments from a web form, but should only be able to be called by authenticated (and trusted) users.

    Read the article

  • Retrieving specific fixtures in Rails

    - by Bilal Aslam
    I have a YML file containing fixtures for a Rails model (Comment) which looks like this (pardon the formatting): comment_a: id: 1 text: 'foo' visible: false comment_b: id: 2 text: 'bar' visible: true comment_c: id: 3 text: 'baz' visible: true I know that I can select an individual Comment fixture like so: comments(:comment_a) In one of my acceptance tests, I want to find all the Comments which have visible = true. How do I select a set of Comments that meet certain criteria so I can iterate over them afterwards?

    Read the article

  • updating rails to 2.3.6

    - by Nik
    can you update your 2.3.5 app with just "gem update rails" and change the version # in environment.rb? I did that and lots of errors came out like in console just typing Post.all would show "undefined method `retrieve_connection' for nil:NilClass". Any ideas? By the way, I have these gems in my environment.rb config.gem "aws-s3", :version = "= 0.6.2", :lib = "aws/s3" config.gem "less" config.gem "authlogic" config.gem "be9-acl9", :source = "http://gems.github.com", :lib = "acl9" config.gem "hash_extension" config.gem "prawn"

    Read the article

  • Rails scalar query

    - by Craig
    I need to display a UI element (e.g. a star or checkmark) for employees that are 'favorites' of the current user (another employee). The Employee model has the following relationship defined to support this: has_and_belongs_to_many :favorites, :class_name => "Employee", :join_table => "favorites", :association_foreign_key => "favorite_id", :foreign_key => "employee_id" The favorites has two fields: employee_id, favorite_id. If I were to write SQL, the following query would give me the results that I want: SELECT id, account, IF( ( SELECT favorite_id FROM favorites WHERE favorite_id=p.id AND employee_id = ? ) IS NULL, FALSE, TRUE) isFavorite FROM employees Where the '?' would be replaced by the session[:user_id]. How do I represent the isFavorite scalar query in Rails? Another approach would use a query like this: SELECT id, account, IF(favorite_id IS NULL, FALSE, TRUE) isFavorite FROM employees e LEFT OUTER JOIN favorites f ON e.id=f.favorite_id AND employee_id = ? Again, the '?' is replaced by the session[:user_id] value. I've had some success writing this in Rails: ee=Employee.find(:all, :joins=>"LEFT OUTER JOIN favorites ON employees.id=favorites.favorite_id AND favorites.employee_id=1", :select=>"employees.*,favorites.favorite_id") Unfortunately, when I try to make this query 'dynamic' by replacing the '1' with a '?', I get errors. ee=Employee.find(:all, :joins=>["LEFT OUTER JOIN favorites ON employees.id=favorites.favorite_id AND favorites.employee_id=?",1], :select=>"employees.*,favorites.favorite_id") Obviously, I have the syntax wrong, but can :joins expressions be 'dynamic'? Is this a case for a Lambda expression? I do hope to add other filters to this query and use it with will_paginate and acts_as_taggable_on, if that makes a difference. edit errors from trying to make :joins dynamic: ActiveRecord::ConfigurationError: Association named 'LEFT OUTER JOIN favorites ON employees.id=favorites.favorite_id AND favorites.employee_id=?' was not found; perhaps you misspelled it? from /Users/craibuc/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations.rb:1906:in `build' from /Users/craibuc/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations.rb:1911:in `build' from /Users/craibuc/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations.rb:1910:in `each' from /Users/craibuc/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations.rb:1910:in `build' from /Users/craibuc/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations.rb:1830:in `initialize' from /Users/craibuc/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1789:in `new' from /Users/craibuc/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1789:in `add_joins!' from /Users/craibuc/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1686:in `construct_finder_sql' from /Users/craibuc/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1548:in `find_every' from /Users/craibuc/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:615:in `find'

    Read the article

  • ruby on rails setup on my ubuntu

    - by hiren
    Do I need to set up virtual hosts as mentioned here: http://wiki.rubyonrails.org/deployment/apache-passenger I am just setting up dev env on my own machine to try and learn ruby on rails. thanks in advance.

    Read the article

  • Problem with Rails ERb rendering?

    - by logan
    A very simple HTML in my .erb file: <a href="javascript:void(0)" id="xyz">Click</a> But when browsing this code in the browser, I get the link which text is: Click (javascript:void(0)). Could you please help me explain why it is? Thanks much for your help. My development environment: Ruby 1.8.7 Rails 2.3.4

    Read the article

  • autosave options in ruby on rails

    - by fregas
    is there a way to turn OFF autosave in rails? I dont' want modifications to an association to automatically save to the database UNTIL i call save on the parent object. some_parent.some_children << child #should not save, just adds to the association! some_parent.save #now parent and children are saved! It this possible or am i barking up the wrong tree?

    Read the article

  • Rails 3 on dreamhost?

    - by p33t3r
    I'd like to deploy a small Rails 3 app on dreamhost (just testing purposes, nothing serious) and I am wondering if anyone did it already... please chose one of I did it and it's super easy, here's how: ... Though I didn't try it, it should be easy, here's how: ... It's quite complicated, but this should get you started: .... NO WAI!!!1!one!1 Set it up on slicehost or another non-shared hosting or you'll die a painful death trying to force it on DH Thoughts?

    Read the article

  • Rails - Add style/image to button_to

    - by ChrisWesAllen
    I'm developing in rails right now and I was wondering if there are any easy ways to add some style to the button_to control. Can you add styling to the <%= submit_tag 'Log in' %> or <%= button_to "Show Me", {:controller => 'personal', :action => "add" } %> It would be great to change the color....But brownie point if someone can tell me how to make it an image

    Read the article

  • rails when to use self.

    - by fenec
    i am developing a rails application and would like to understand when do we use self.for . here is the code of a method that i would like to fully understand.if it is possible i would like to have an alternative to this code so it would make things more clear. enter code here def self.for(facebook_id) User.create_by_facebook_id(facebook_id) end

    Read the article

  • Rails Fixtures vs. Mocks

    - by Thiago
    Hi there, I'm developing a Rails app, and I was just talking with my colleague that we have a mix of fixtures and mocks in our tests, which we're doing using cucumber and Rspec. The question would be: when should each one be used?

    Read the article

  • Getting a full list of the URLS in a rails application

    - by Laurie Young
    How do I get a a complete list of all the urls that my rails application could generate? I don't want the routes that I get get form rake routes, instead I want to get the actul URLs corrosponding to all the dynmically generated pages in my application... Is this even possible? (Background: I'm doing this because I want a complete list of URLs for some load testing I want to do, which has to cover the entire breadth of the application)

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >