Re: [Rails] Who is causing a partial to be rendered?

2017-07-26 Thread Ralph Shnelvar
This is close to what I want, I think. Where does the "@mailer_name = caller_locations(1,1)[0].label " go? In a controller? In a view? What I really want is to not have to modify the source modules that are invoking the rendering but, instead, have the _header.html.erb source module dynamica

Re: [Rails] Who is causing a partial to be rendered?

2017-07-26 Thread Phil Edelbrock
> On Jul 26, 2017, at 8:58 PM, Ralph Shnelvar wrote: > > Is the a convenient programatic way for a partial to know what view > (controller?) is causing it to be rendered? > > For debugging purposes I want the partial to render the name of the view > causing the partial to be rendered.. > > R

[Rails] Re: CSRF tokens to not match what is in session (Rails 4.1)

2017-07-26 Thread Frederick Cheung
On Wednesday, July 26, 2017 at 3:24:19 PM UTC+1, Jason FB wrote: > > The exception we see is simply ActionController::InvalidAuthenticityToken on > normal logins to our website. Upon careful examination of the  > authenticity_token sent by the form and the session's _csrf_token (we are > using

Re: [Rails] Who is causing a partial to be rendered?

2017-07-26 Thread Greg Navis
I think rack-mini-profiler should fit the bill. It shows the queries you executed and layouts you rendered. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this grou

[Rails] Who is causing a partial to be rendered?

2017-07-26 Thread Ralph Shnelvar
Is the a convenient programatic way for a partial to know what view (controller?) is causing it to be rendered? For debugging purposes I want the partial to render the name of the view causing the partial to be rendered.. Ralph -- You received this message because you are subscribed to the Go

[Rails] Pre-loaded fixtures wiped-out by test run

2017-07-26 Thread Alex Dilley
If you preload your test database with all fixture data via the rake task: bin/rails db:fixtures:load And set self.pre_loaded_fixtures to true: class ActiveSupport::TestCase self.pre_loaded_fixtures = true self.use_transactional_tests = true # the default fixtures :all end Would you expe

Re: [Rails] Devise's helper - confirmation_url(@resource, confirmation_token: @token) - returns localhost3000

2017-07-26 Thread Hassan Schroeder
On Wed, Jul 26, 2017 at 11:38 AM, Walter Lee Davis wrote: > Not since several versions ago. They heard your displeasure and did something > about it. Well in that case -- evermind 😀 Still, I prefer the flexibility of having a proxy in front of Unicorn or Puma since I can strip out nonsense

Re: [Rails] Devise's helper - confirmation_url(@resource, confirmation_token: @token) - returns localhost3000

2017-07-26 Thread Walter Lee Davis
> On Jul 26, 2017, at 1:35 PM, Ralph Shnelvar wrote: > > Hassan: > > 1) Does Passenger dump that sensitive data in development? > > 2 How hard is it to remove Passenger? What are the downsides to removing it? You have to replace it with *something* -- Unicorn, Puma, basically another app se

Re: [Rails] Devise's helper - confirmation_url(@resource, confirmation_token: @token) - returns localhost3000

2017-07-26 Thread Walter Lee Davis
Not since several versions ago. They heard your displeasure and did something about it. Walter > On Jul 26, 2017, at 1:28 PM, Hassan Schroeder > wrote: > > I'm not a Passenger fan after discovering that any startup error in > production dumps a page full of sensitive data out for anyone to >

Re: [Rails] Devise's helper - confirmation_url(@resource, confirmation_token: @token) - returns localhost3000

2017-07-26 Thread Ralph Shnelvar
Hassan: 1) Does Passenger dump that sensitive data in development? 2 How hard is it to remove Passenger? What are the downsides to removing it? Ralph On Wednesday, July 26, 2017 at 11:29:28 AM UTC-6, Hassan Schroeder wrote: > > On Wed, Jul 26, 2017 at 7:57 AM, Ralph Shnelvar > wrote: > > I

Re: [Rails] Devise's helper - confirmation_url(@resource, confirmation_token: @token) - returns localhost3000

2017-07-26 Thread Hassan Schroeder
On Wed, Jul 26, 2017 at 7:57 AM, Ralph Shnelvar wrote: > I think Passenger is running Yep, looks like. > I've read overviews about Passenger ... but I still don't get what it does. > Does it sit between Apache (httpd) and Rails? What does it do that Apache > (httpd) doesn't do? Apache httpd h

Re: [Rails] CSRF tokens to not match what is in session (Rails 4.1)

2017-07-26 Thread Walter Lee Davis
> On Jul 26, 2017, at 10:24 AM, Jason FB wrote: > > https://stackoverflow.com/questions/45329731/csrf-tokens-to-not-match-what-is-in-session-rails-4-1 > > > We are seeing an unfortunate and likely browser-based CSRF token authenticity > problem in our Rails 4.1 app. We are posting it here to

Re: [Rails] Devise's helper - confirmation_url(@resource, confirmation_token: @token) - returns localhost3000

2017-07-26 Thread Ralph Shnelvar
I *think *Passenger is running The following is what I see before I invoked Firefox ralph-data@ralph-data:~$ date Wed Jul 26 08:27:49 MDT 2017 ralph-data@ralph-data:~$ passenger -v Phusion Passenger 5.1.1 ralph-data@ralph-data:~$ sudo passenger-status [sudo] password for ralph-data: Version : 5.1

[Rails] CSRF tokens to not match what is in session (Rails 4.1)

2017-07-26 Thread Jason FB
https://stackoverflow.com/questions/45329731/csrf-tokens-to-not-match-what-is-in-session-rails-4-1 We are seeing an unfortunate and likely browser-based CSRF token authenticity problem in our Rails 4.1 app. We are posting it here to ask the community if others are seeing it too. Please be awa

Re: [Rails] Devise's helper - confirmation_url(@resource, confirmation_token: @token) - returns localhost3000

2017-07-26 Thread Hassan Schroeder
On Wed, Jul 26, 2017 at 2:53 AM, Ralph Shnelvar wrote: >> First, "Apache" is the name of an organization; "Apache httpd" is a >> web server (which many people erroneously refer to as "Apache"). >> > Lordy, you're even more of a pedant than I am. :-) It's a losing battle, but the ASF (Apache Sof

[Rails] Re: Upgrading to rails 5.0

2017-07-26 Thread João Bordalo
The problem isn't related to the compatibility. just replace to: Rails.configuration.respond_to?(:scheduler) on the line that I pointed Em terça-feira, 25 de julho de 2017 20:21:35 UTC+1, João Bordalo escreveu: > > Hi there, > > I'm upgrading an app from rails 4.2.7 to 5.0.4. > > I have upda

[Rails] Re: Upgrading to rails 5.0

2017-07-26 Thread João Bordalo
Hi, again, I forgot to mention that block of code belongs to the file config/initializers/scheduler.rb Additionally, I tried to put rufus-scheduler to the verson that worked in rails 4.2.7. Still, no effect. That's highly possible what you said. Thank you for your help and after I have some

Re: [Rails] Devise's helper - confirmation_url(@resource, confirmation_token: @token) - returns localhost3000

2017-07-26 Thread Ralph Shnelvar
Norm, Please see my answer to Hassan. I think I'm doing something similar to that ancient version. I can report that in my operating environment, there is no environment variable named SERVER_SOFTWARE. Ralph On Tuesday, July 25, 2017 at 3:49:47 PM UTC-6, Norm wrote: > > On an ancient version

Re: [Rails] Devise's helper - confirmation_url(@resource, confirmation_token: @token) - returns localhost3000

2017-07-26 Thread Ralph Shnelvar
Hassan, Comments interspersed. And, again, thank you. Ralph On Tuesday, July 25, 2017 at 2:42:17 PM UTC-6, Hassan Schroeder wrote: > > On Tue, Jul 25, 2017 at 12:19 PM, Ralph Shnelvar > wrote: > > > So what is the correct phrase for knowing what kind of server Rails is > > running under? >