[Rails] Problems with ActionMailer

2013-09-26 Thread steve ross
I'm having a tough time tracking down why my mail is not being sent from an app I migrated from 3.0 -> 3.1 -> 3.2. The relevant code sections are in this SO question. My questions here are: 1) Does something just jump out as wrong in my setup? 2) How would you track this down. All my specs pass

Re: [Rails] Dynamic css files using scss

2011-09-13 Thread steve ross
This is a heck of a lot easier to do in the presentation than the style. Consider this: body .red background-color: red .green background-color: green Stuff inside In your controller (or application controller), simply set @theme_main_color to whatever you want. On Sep 13, 20

[Rails] Technical writer familiar with Rails and documenting a RESTful API

2011-04-02 Thread steve ross
e. I was kind of feeling your pain when I replied. If something comes up, please let me know -- I'm happy to look at interesting work! Regards, Steve Ross On Mar 26, 2011, at 1:20 PM, Bill Walton wrote: > Hi Steve, > > Thanks for asking. I've engaged someone who I think

Re: [Rails] [JOBS] Technical writer familiar with Rails and documenting a RESTful API

2011-03-26 Thread steve ross
Any luck with this, Bill? I might be able to do it if the specifics are right... Steve Ross On Feb 28, 2011, at 7:12 AM, Bill Walton wrote: > I have a short-term contract position opening for a technical writer. > The position is telecommute and is probably a week to 2 weeks worth of >

Re: [Rails] Re: rspec test case

2010-10-21 Thread steve ross
On Oct 21, 2010, at 1:48 PM, Robert Walker wrote: > Steve Ross wrote in post #956143: >> On Oct 20, 2010, at 11:34 PM, Ishit Parikh wrote: >> >>> I want test case in rspec for: >>> @drugs = Drug.where('drug_category_id = ?', params[:id]) >

Re: [Rails] rspec test case

2010-10-21 Thread steve ross
On Oct 20, 2010, at 11:34 PM, Ishit Parikh wrote: > I want test case in rspec for: > @drugs = Drug.where('drug_category_id = ?', params[:id]) > > Has anybody idea about it? describe Drug it "should really be posted to the rSpec Google Group :)" it "would be helpful for you to read the Prag.

Re: [Rails] newbie q on activerecord - has_one and has_many on same table?

2010-10-04 Thread steve ross
Parent has_many :children scope :primary, where(:role => 'primary') Or something like that. The syntax of scope, or named_scope differs depending on the version of Rails, but you get the idea... You'll probably want to add code to make sure that only one child has the primary role for a part

Re: [Rails] Missing template classified/update.erb in view path app/view

2010-09-19 Thread steve ross
Typically your show action does not allow for user input. The edit action does. In any case, is there a classified/edit.erb and if you are trying to render it, then it implies that the update failed. Do you know why? On Sep 19, 2010, at 11:03 AM, Faisal Basha wrote: > Iam trying to build a clas

[Rails] Re: passenger on localhost

2010-05-30 Thread Steve Ross
Ahmet Kilic wrote: Steve Ross wrote: Ahmet Kilic wrote: DocumentRoot /var/www/site/public and its running fine in development. Check /log dir, and look for development.log file,. it is Ok for me also. But why it is not working with RailsEnv production??? Is it not a bit strange

[Rails] Re: passenger on localhost

2010-05-29 Thread Steve Ross
Ahmet Kilic wrote: alexey wrote: "We're sorry, but something went wrong. We've been notified about this issue." It is a rails error, and maybe you are in production mode, My apache conf: NameVirtualHost site.com:80 ServerName www.site.com RailsEnv development RailsAllowModRewrite

Re: [Rails] Re: Re: XMLHttpRequest and Rails

2010-05-24 Thread steve ross
On May 24, 2010, at 11:38 AM, Ralph Shnelvar wrote: > >> Or skip the RJS and just write JavaScript. I tend to think that RJS is >> one of the more pointless features of Rails... >> >> Best, >> -- >> Marnen Laibow-Koser >> http://www.marnen.org >> mar...@marnen.org > > Which is exactly what I h

Re: [Rails] list controller actions

2010-05-19 Thread steve ross
On May 19, 2010, at 2:01 PM, Chris Habgood wrote: > Cool forgot about the (false). Any way to get the respond_to formats also > > On Wed, May 19, 2010 at 15:55, steve ross wrote: > On May 19, 2010, at 1:35 PM, Me wrote: > > > > Is there a way to list on a web page the cu

Re: [Rails] list controller actions

2010-05-19 Thread steve ross
On May 19, 2010, at 1:35 PM, Me wrote: > > Is there a way to list on a web page the current controller actions > define din the controller? Would like to put up a link for each > automatically. >> PagesController.instance_methods(false) => ["destroy", "contact", "list", "show", "expire_all", "e

Re: [Rails] Can I play with Rails 3 without destroying my Rails 2 setup?

2010-05-14 Thread steve ross
On May 14, 2010, at 12:23 PM, comopasta Gr wrote: > > Hi, > > I should start playing with Rails 3 but I don't want to use a different > machine for that. > > I am currently on Rails 2.3.5 and I'm not yet using RVM. > I know the RVM will help on the Ruby side. But what about the Rails > side, how

Re: [Rails] How does one set an HTTP header in @request for a functional test

2010-04-22 Thread steve ross
On Apr 22, 2010, at 12:18 PM, Nathan Beyer wrote: > > I have a very simple functional test for a controller, but I need to > set a header field in the request before the invocation of the action, > but the headers seem to be getting reset, even though I'm not doing > multiple requests. Is this not

Re: [Rails] Re: Re: api.rubyonrails.org site is taken over by a domain

2010-04-22 Thread steve ross
On Apr 22, 2010, at 5:35 AM, Marnen Laibow-Koser wrote: > > Fernando Perez wrote: >>> What a pointless remark. 37signals paid the renewal of the domain well >>> beforehand, their registrar screwed up again. That's hardly their >>> fault and has nothing to do with 37signal's infrastructure. >> It's

Re: [Rails] Re: newb's quick question on session variable vs. params in 'pretty' urls

2010-04-18 Thread steve ross
27;t seem to make sense to publicize a reference to the > transitional object in a url because the referenced object will not be > persisted indefinitely -- indeed its creation should be silent to the > user. > > Grar > > On Apr 16, 2:07 pm, steve ross wrote: >> On

Re: [Rails] Rails 3 + Rspec 2 + Remarkable

2010-04-16 Thread steve ross
+1 On Apr 16, 2010, at 6:44 PM, Diego Carrion wrote: > I care about it :) > > +1 > > On Fri, Apr 16, 2010 at 7:08 PM, Ho-Sheng Hsiao > wrote: > Cool, glad I'm not out in the cold on this one ;-) > > I've been making updates on this thread as I go along with the port: > > http://groups.googl

Re: [Rails] newb's quick question on session variable vs. params in 'pretty' urls

2010-04-16 Thread steve ross
On Apr 15, 2010, at 2:37 PM, Grary wrote: > > Hi, > > Is there a compelling reason to prefer reliance on the params hash vs. > the same info stored in a session hash? So, for example, params[:id] = > @loan vs. session[:loan_id] = @loan.id? It matters because I can make > prettier urls if I store

Re: [Rails] Image preloading

2010-04-11 Thread steve ross
It all depends, as you say, on why you're preloading the images. Most of the image preloading code looks exactly like the OP's and works fine if your UI relies on just having the images cached by the browser so they can work in smooth rollovers or other page effects that rely on image swapping.

Re: [Rails] Re: Image preloading

2010-04-11 Thread steve ross
On Apr 11, 2010, at 4:15 AM, ChaosKnight wrote: > > On Apr 11, 3:43 am, steve ross wrote: >> On Apr 10, 2010, at 9:32 AM, ChaosKnight wrote: >> >>> Hi, I am still very new to Ruby on Rails, but I'm busy with my first >>> RoR website, everything w

Re: [Rails] Image preloading

2010-04-10 Thread steve ross
On Apr 10, 2010, at 9:32 AM, ChaosKnight wrote: > > Hi, I am still very new to Ruby on Rails, but I'm busy with my first > RoR website, everything went well, until I realized that my images > didn't preload... On previous websites I used a simple JavaScript > preloader that seemed to work very wel

Re: [Rails] Re: haml issue

2010-04-09 Thread steve ross
On Apr 9, 2010, at 6:50 AM, Leonardo Mateo wrote: > > On Fri, Apr 9, 2010 at 10:42 AM, John Merlino wrote: >> Leonardo Mateo wrote: >>> On Thu, Apr 8, 2010 at 8:07 PM, John Merlino >>> wrote: � � � � � �= @chart � � � � � �%td � � � � � � �.panel#activity-chart � � � � � � �

Re: [Rails] paperclip question

2010-04-04 Thread steve ross
On Apr 4, 2010, at 10:13 PM, bramu...@gmail.com wrote: > > Hi All, > > My application is using paperclip and its working fine without any > problems, I am able to generate the thumb images and big images from > actual uploaded images. There are many images already uploaded by the > users. Now I

Re: [Rails] Putting Sessions in the Database

2010-03-30 Thread steve ross
On Mar 29, 2010, at 10:31 PM, Yudi Soesanto wrote: > Hi, > > I have rails version 2.3.5. > How I can use session? is there any documentation how to use it for rails > 2.3.5? > > Thanks, > Yudi Soesanto > > -- Look in config/initializers/session_store.rb. The comment block at the end of the

Re: [Rails] Rails 3 and Friendship models

2010-03-04 Thread steve ross
On Mar 2, 2010, at 9:40 PM, Peng Zhong wrote: > ## VIEWS > > # users/index.html.haml > = link_to 'Add Friend', friendships_path(:friend_id => user), :method => :post > Try doing rake routes to see what friendships_path is. Betcha it is FriendshipsController#index -- You received this message

Re: [Rails] Re: Optimizing ActiveSupport with native code

2010-02-07 Thread steve ross
On Feb 7, 2010, at 1:18 PM, Marnen Laibow-Koser wrote: > > Steve Ross wrote: >> On Feb 7, 2010, at 12:31 PM, Mat Brown wrote: >>> So I'm looking for feedback from the group on that idea. Some >>> But native implementations are probably only useful for methods t

Re: [Rails] Optimizing ActiveSupport with native code

2010-02-07 Thread steve ross
On Feb 7, 2010, at 12:31 PM, Mat Brown wrote: > > I've had this idea kicking around in my head for a while, and had some > time yesterday to start playing around with it: ActiveSupport is > heavily used in both the Rails library code and in the application > layer of a typical Rails stack. Certain

Re: [Rails] Re: #

2010-02-07 Thread steve ross
On Feb 7, 2010, at 10:12 AM, Marnen Laibow-Koser wrote: > > Paul Harrington wrote: >> Ralph Shnelvar wrote: That's utterly bizarre. In what context are you getting this error? >>> >>> I, and many others, seem to randomly get this error. Right now I am >>> gettnig a lot of them as I `somep

Re: [Rails] Re: jQuery, RoR, validating fields against a database

2010-01-31 Thread steve ross
On Jan 31, 2010, at 1:04 PM, Ralph Shnelvar wrote: > > Steve Ross wrote: >> On Jan 31, 2010, at 11:48 AM, Ralph Shnelvar wrote: >>> >>> I have a list of fields in a form that need to be validated against a >>> database. >>> >>> I would

Re: [Rails] Re: jQuery, RoR, validating fields against a database

2010-01-31 Thread steve ross
On Jan 31, 2010, at 1:04 PM, Ralph Shnelvar wrote: > > Steve Ross wrote: >> On Jan 31, 2010, at 11:48 AM, Ralph Shnelvar wrote: >>> >>> I have a list of fields in a form that need to be validated against a >>> database. >>> >>> I would

Re: [Rails] jQuery, RoR, validating fields against a database

2010-01-31 Thread steve ross
On Jan 31, 2010, at 11:48 AM, Ralph Shnelvar wrote: > > I have a list of fields in a form that need to be validated against a > database. > > I would prefer to have the validation occur every time the field loses > focus (onblur event) rather than when the user does a submit. > > Does anyone kno

Re: [Rails] jQuery & Rails installation

2010-01-31 Thread steve ross
On Jan 31, 2010, at 11:45 AM, Ralph Shnelvar wrote: > > I'm missing something basic ... > > How does one install jQuery in RoR? The old fashioned way. Download it from jQuery.com and stick the .js files in public/javascripts. jQuery is not "supported" by the javascript helpers in Rails. But i

Re: [Rails] Append/Prepend to a template from controller method

2010-01-30 Thread steve ross
Hello-- On Jan 30, 2010, at 7:38 PM, Aaron Stacy wrote: > > I want a method in app/controllers/application.rb that can > prepend/append text to whatever template gets rendered. Of course I > can't call render twice w/o getting a double render error, so is this > possible? > > I want to redirect

Re: [Rails] Re: Re: Are class variables session specific?

2010-01-30 Thread steve ross
On Jan 30, 2010, at 3:06 PM, Ralph Shnelvar wrote: > > So ... are "params" visible to 3rd parties if session management is done > via a cookie-based approach? > If using ActionController::Base.session_store = :active_record_store a > better way to do things? If so ... why isn't this the default

Re: [Rails] Re: Re: Are class variables session specific?

2010-01-30 Thread steve ross
On Jan 30, 2010, at 3:06 PM, Ralph Shnelvar wrote: > >> I'm pretty sure that the only way to deal with values which have to be >> seen between requests is to either put them in some persistent storage >> on the server (e.g. the DB, SQL or noSQL), or in the session and let >> the browser give it ba

Re: [Rails] Re: Internal Server Error - newb question

2010-01-30 Thread steve ross
On Jan 30, 2010, at 12:19 PM, Heinz Strunk wrote: > > CGI::Session::CookieStore::CookieOverflow is raised when storing more > than 4K of session data. I assume you are asking why you got this error. It seems pretty descriptive to me. You're sticking too much stuff in your session. Put an id of

Re: [Rails] Select input with nothing selected does not delete

2010-01-30 Thread steve ross
On Jan 29, 2010, at 4:41 PM, Jerry Franks wrote: > > Consider this situation: a model Person and a model State with a habtm > association between them. A person can be associated with one or more > States and a state can be associated with more than one person. > > In a web form I have a SELECT i

Re: [Rails] requiring records in the DB before testing

2010-01-29 Thread steve ross
On Jan 29, 2010, at 11:22 AM, kkohrt wrote: > > Is there any way I can require a small set of data be in the test > database before any tests are run? (unit, functional, integration, > cucumber, etc) > Any way besides using fixtures, that is. > Overload a rake task? > Modify test_helper? > Any ide

Re: [Rails] Action Mailer new DSL merged

2010-01-25 Thread steve ross
Have you seen this: http://gist.github.com/281420 On Jan 25, 2010, at 6:29 PM, Mikel Lindsaar wrote: > > Hi all, > > Just letting you know we have a new DSL for Action Mailer. > > class Notifier < ActionMailer::Base > delivers_from("sys...@example.com") > > def signup_notification(recipient)

Re: [Rails] best search facility

2010-01-25 Thread steve ross
On Jan 24, 2010, at 2:33 PM, RubyonRails_newbie wrote: > > Hi All, > > this may over-lap with my recent ferret post, but I wondered if anyone > knew of the best way to add a search engine for rails on your site? > > I've tried ferret, which seems a bit ''hit n miss'' They all seem a bit "hit n

Re: [Rails] Re: Create Temporary Sqlite in Memory

2010-01-20 Thread steve ross
On Jan 19, 2010, at 10:47 PM, Karl Smith wrote: > > I gave up. Not sure this can even be done in AR, at least not without > a fair amount of custom sql. > > Went with creating a temporary table in production database > (postgresql). Not as fast as sqlite/memory, but acceptable. Have you conside

Re: [Rails] Re: Dynamic Assets - can it be done?

2010-01-15 Thread steve ross
On Jan 15, 2010, at 9:31 AM, Alpha Blue wrote: > > Frederick Cheung wrote: >> On Jan 15, 3:50 pm, Alpha Blue wrote: >>> Fred, so the issue with the code above is this: >>> >>> When using such a helper it will display: >>> >>> link href="/stylesheets/public/themes/default/stylesheets/default.css

Re: [Rails] Accessing Raw Post Data

2010-01-13 Thread steve ross
On Jan 13, 2010, at 9:59 AM, doug wrote: > > Rails conveniently packages post data in the params hash. The order > in which data is stored in a hash is typically not the order in which > the data was entered. Generally this is not a problem; however, there > are some unusual fact patterns in whi

Re: [Rails] Re: Should I continue with rails?

2010-01-08 Thread steve ross
On 1/8/10 11:56 AM, "Dan Smith" wrote: > My main problem atm is the lack of error messages when something goes > wrong. The error messages are exactly where they are supposed to be: In the logs. You haven't provided enough info about the app, the host, or the environment, but you should check:

Re: [Rails] ActionMailer SITE constant

2010-01-07 Thread steve ross
env['HTTP_HOST'] Maybe? On 1/7/10 9:27 AM, "Ralph Shnelvar" wrote: > ActionMailer is expecting the constant SITE to be initialized. > > I could put > SITE = 'http://localhost:3001' > in development.rb > > but > > what I would like to do is to set this constant programmaticly to the > curr