#RubyOnRails - 19 October 2018
« Back 1 day Forward 1 day »
[00:02:29] quazimodo: switches out your gems and you can implement your own rails 'bits' & simply ask what version you're at to do version specific stuff
[00:39:11] mlt-: Now I can't figure out why RSpec/capybara/selenium won't find assets if I altered config.assets.prefix . If I start dummy app with either dev or test environment, I can access everything just fine with assets path I want, but running tests fails :(
[02:29:49] strp0s: hello, I'm having issue getting my rails app migrated from passenger standalone to nginx+passenger. I'm receiving a 500 error with nginx, but can run the app with WEBrick. Anyone able to help?
[02:37:49] strp0s: Here's a gist with all the details: https://gist.github.com/thomasjost/85ae873b0380fdb6f1bf474da1ec41f9
[09:09:46] Arkentias: Hello! I have a very basic question. All my Users belong to a Client. The email is unique per client. I want to retrieve all the Clients that have a user with an email address X. Do I just do User.where(email: x).joins(:client).select('clients.*') or something in that idea? (or use pluck I guess)
[09:10:45] DaniG2k: Hello all. I'm trying to add a few lines to every setup and teardown for a number of integration tests (using ActionDispatch::IntegrationTest). I basically want to do DatabaseCleaner.start on every setup and Warden.test_reset!; DatabaseCleaner.clean on every teardown
[09:11:08] DaniG2k: I tried moneky-patching the setup and teardown methods in ActionDispatch::IntegrationTest and then calling super on those
[09:11:34] DaniG2k: but that doesn't seem to work, as I get a NoMethodError: super called outside of method
[09:12:38] DaniG2k: I'm wondering how I can use the same code for every setup and teardown without overriding the more specific setup and teardown within my integration tests
[09:20:26] DaniG2k: I've outlined my problem in a bit more detail on SO: https://stackoverflow.com/questions/52889412/how-to-write-a-base-setup-and-teardown-that-runs-before-every-actiondispatchin
[09:35:48] adac: Hi! Does someone of you use Atom with rubocop linter? I'm wondering how to make atom the ruby binary from the current project I'm in (I'm actually using RVM)
[10:24:42] josefhovad: Hi. When I have /pages/index.html.erb with e.g.: <%= t('.edit') %> … is there some way how to find translation 'en.pages.index.edit' … and if not found, try to find 'en.pages.edit', if not found try to find 'en.edit' ?
[13:08:12] ss942: exactyly what I need to have in my href is /projects/1/issues/new?issue[custom_field_values]=1
[13:08:12] ss942: doesn't make any sense, because it looks for [custom_field_value] in :issues taking it as an array
[13:11:23] gt2019: Hi, i am using rails (4.2.5); I am facing an issue with timeout queries. I have modified the database.yml file multiples time and this error appear again: "ActiveRecord::ConnectionTimeoutError: could not obtain a database connection within 5.000 seconds (waited 5.000 seconds)". My database file: https://gist.github.com/LuisErnestoZamb/43804ca1c1ebc3d05bf32c55e55b8671 ; Even if I change this to 10 on checkout_timeout the error persist an
[15:04:41] morfin60: i am using gem which sets callback inside of concern but i need to change behavior of this gem a bit(basically i want to generate slug only when it's empty in request). Any idea how can i do this?
[15:22:20] ss942: Strange... I use <%= select_tag(select_id, options_for_select(options_for_project_select, selected: wkcustomfield.projects_id )) %>
[15:22:20] ss942: It renders <option selected="selected" value="1">Serwis</option> in my html, but still this option is not displayed as selected in my browser...
[15:25:56] ss942: It still display last value I selected, even if I reload page, and even if first one have option selected="selected"
[17:05:09] ss942: I mean I want to get "/wktime/index" instead "https://www.redmine.mydomain.com/wktime/index"
[18:29:41] anoob: Is it possible to read an ENV var within a .env file: `DATABASE_URL=postgres://username:passwd@localhost:5432/db_name<%= ENV['TEST_ENV_NUMBER'] %>` ?
[18:42:29] Inside: Having a derp moment: I have a model I use for describing a form and it derives from ApplicationRecord. There is, however, no database table behind that model.
[18:43:24] Inside: In one project (Rails 4.1.2) I'm able to just use that model - the only thing I can't do is call save. In a new rails 5 project rails complains about no such table whenever I did TableLessModel.new()