Re: [Rails] how to use form_with

2019-11-18 Thread Rob Zolkos
Have you read the Rails API docs and Rails Guides for usage of form_with? https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_with https://guides.rubyonrails.org/form_helpers.html On Mon, Nov 18, 2019 at 2:25 PM fugee ohu wrote: > Trying to build a rails 5.2

Re: [Rails] no root path

2019-03-29 Thread Rob Zolkos
Not quite sure what you're asking. Rails by default has no root path configured. You have to add that in yourself.You can have non-root paths too. If you see a Rails app where the root path seems to work but there isn't one defined it could be being proxied there by the webserver. On Fri,

Re: [Rails] update scope statement for rails 5.1.4 from rails 3.11

2019-03-28 Thread Rob Zolkos
scope :ending, -> { limit(4) } On Thu, Mar 28, 2019 at 4:52 AM fugee ohu wrote: > > How would I correct this scope statement from my model for rails 5.1.4 > scope :ending, :limit => 4 > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk"

Re: [Rails] My rails app display the authenticity token in the browser url

2019-03-21 Thread Rob Zolkos
Looks like you are not redirecting the user to another page when the contact info has been sent. Do you want to redirect them to the home (or another) page and show a "Your message has been sent" alert? replace flash.now[:error] = nil with redirect_to root_path, notice: 'Your message has been

Re: [Rails] Re: Leaking authenticity_token in logs

2019-03-16 Thread Rob Zolkos
It varies on each request https://medium.com/rubyinside/a-deep-dive-into-csrf-protection-in-rails-19fa0a42c0ef On Sat, Mar 16, 2019 at 2:19 AM 0x01 wrote: > I do use Heroku and pipe logs to Papertrail (log aggregation service). > Also, logs are stored in Amazon S3 for some time. > > If these

Re: [Rails] Building basic airline reservation system with Ruby on Rails

2019-02-11 Thread Rob Zolkos
This is totally doable without javascript.Rails works perfectly fine without Javascript. You will need to re-render the page from the server on any change/submit. That is ok (I suspect the exercise they are trying to teach you is that these sorts of interactions *can* be done in a server

Re: [Rails] clipboard.js with html.erb to be copied to clipboard

2019-02-10 Thread Rob Zolkos
Is the Ruby on Rails list the best place to ask this question? On Sun, Feb 10, 2019 at 6:45 PM fugee ohu wrote: > I'm trying to implement clipboard.js It works if i put a simple text > string inside the ... > containers but if I put the html shown below it copies only newline and > whitespace

Re: [Rails] When tests pass in CI but fail in the development environment

2019-01-23 Thread Rob Zolkos
I would check the environments are the same and try to diagnose what is different. Start with - Same Ruby versions - Same database and database versions (especially if the failures are database ones) Is the failures due to an area of code that uses any native gems that may have not been

Re: [Rails] Spree can't update spree_preferneces table

2019-01-14 Thread Rob Zolkos
The spree tag on StackOverflow is active. That combined with http://www.catb.org/esr/faqs/smart-questions.html should help On Mon, Jan 14, 2019 at 3:53 PM fugee ohu wrote: > Changes to spree_preferences roll back and there's no error anywhere but > it works in development If the problem is a

Re: [Rails] column named "key"

2019-01-08 Thread Rob Zolkos
There didn't seem to be a question here but assume you want to know how to select a column with a reserved word. This issue has some examples https://github.com/rails/rails/issues/2601 Looks like using a symbol or double quoting it should work. On Mon, Jan 7, 2019 at 7:40 PM fugee ohu wrote:

Re: [Rails] spree 3.6.4 override images

2019-01-03 Thread Rob Zolkos
Have you tried asking on Stack Overflow? https://stackoverflow.com/ On Thu, Jan 3, 2019 at 8:43 AM fugee ohu wrote: > I haven't been able to get my logo to work in spree 3.6.4 it displays as a > resource unavailable broken glyphicon even though the path to image file is >

Re: [Rails] how do i use chromedriver-helper without capybara

2018-12-27 Thread Rob Zolkos
Is this in a test? Whats the scenario you are trying to achieve? On Thu, Dec 27, 2018 at 1:03 PM fugee ohu wrote: > > How do I create a new instance of chromedriver-helper to fetch a url > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk"

Re: [Rails] Capybara visit url from s rails console

2018-12-27 Thread Rob Zolkos
On the rails console try app.get('/') (replace the string with a path) eg app.get('/about') On Wed, Dec 26, 2018 at 4:58 PM fugee ohu wrote: > > When I try to run `visit ` from rails console rails complains so such > route, of course there's no supposed to be since I'm not requesting a page

Re: [Rails] rails & custom devise controller > email templates

2018-11-26 Thread Rob Zolkos
This may help https://til.codes/rails-devise-send-different-emails-for-confirmation-based-on-the-presence-of-attribute-or-parameter/ You can also configure which email layout to use (would be similar to how you are setting the application layout to use). # Or to configure mailer layout

Re: [Rails] Not able to run the server for any app

2018-10-23 Thread Rob Zolkos
Try running gem pristine --all On Tue, Oct 23, 2018 at 10:11 PM Piyush Chowhan wrote: > Rails 5.2.1 > > Ruby 2.5.1 > > are installed > > Not able to run server for any app > What am I missing? > rails s > > *Traceback* (most recent call last): > > 2: from /usr/local/bin/rails:23:in `' > > 1:

Re: [Rails] Test coverage in Rails apps

2018-10-20 Thread Rob Zolkos
In development run your tests with the DISABLE_SPRING=1 flag before the test command and see if you see a difference in coverage. On Sun, Oct 21, 2018 at 12:17 AM Jason Hsu, Ruby on High Speed Rails < jhsu802...@gmail.com> wrote: > How can I get test coverage results to show more consistent

Re: [Rails] country select gem

2018-10-03 Thread Rob Zolkos
<%= f.select :country, options_for_select(["CA", "US"]) %> On Thu, Oct 4, 2018 at 6:40 AM Joe Guerra wrote: > I'm not sure why I went to this extent, but I was trying to remove the gem > and failed. (it still kept finding the helper method - even though I > removed it from my view) > >

Re: [Rails] something strange with sqlite ?

2018-09-17 Thread Rob Zolkos
doubtful. They are very different. Any reason you can't stick with one of them? On Tue, Sep 18, 2018 at 8:24 AM Joe Guerra wrote: > Thanks, I'll try that. > > Hopefully it works for postgres and sqlite. > > On Mon, Sep 17, 2018, 5:18 PM Rob Zolkos, wrote: > >> I thi

Re: [Rails] something strange with sqlite ?

2018-09-17 Thread Rob Zolkos
I think you will need to wrap todaydate in strftime for sqlite. Away from computer to check but google ‘date arithmetic sqlite’ On Tue, 18 Sep 2018 at 6:20 am, Joe Guerra wrote: > I have an active record query (for my categories) that check for the date > ( .where( 'enddate > ?', todaydate

Re: [Rails] respond_to :js

2018-09-13 Thread Rob Zolkos
This was removed at class level in Rails 4.2 . https://edgeguides.rubyonrails.org/4_2_release_notes.html#respond-with-class-level-respond-to You can leave the instance level one it will work fine. On Fri, Sep 14, 2018 at 12:37 AM fugee ohu wrote: > respond_to :js, only: :videochat > > def

Re: [Rails] What is the name of that gem?

2018-09-10 Thread Rob Zolkos
These problems are largely solved by webpacker now in Rails. Just add npm packages to your package.json (just as easy as adding to a Gemfile) and it works great with the asset pipeline. On Tue, 11 Sep 2018 at 6:50 am, Walter Lee Davis wrote: > Someone reminded me off-list that I was thinking

Re: [Rails] What is the name of that gem?

2018-09-10 Thread Rob Zolkos
Are you thinking of https://rails-assets.org/#/ On Tue, 11 Sep 2018 at 6:18 am, Greg Navis wrote: > I found https://github.com/endenwer/npm-rails but it uses a separate > file, not Gemfile. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails:

[Rails] OmniAuth provider not working (single sign on, two Rails apps)

2011-11-21 Thread Rob Zolkos
I'm new to OmniAuth and am trying to get two sample apps (a provider and a client) to work. I have two sample apps I forked from a blog post on omniauth and single sign in: http://blog.joshsoftware.com/2010/12/16/multiple-applications-with-devise-omniauth-and-single-sign-on/ Provider -