Re: [Rails] Is it worth switching to Postgresql?

2020-03-14 Thread Rob Jonson
king for trouble) cheers, Rob On Sat, 14 Mar 2020 at 15:17, Phil Edelbrock wrote: > > I think Ariel's reply is spot-on. Rails is basically DB agnostic, however > I think the trend is that PostgreSQL is the more favored backend (except > for stuff like Wordpress). We're doin

[Rails] Is it worth switching to Postgresql?

2020-03-14 Thread Rob Jonson
postgresql these days, I'm wondering if anyone can comment on whether it's worth putting in the effort to learn a new db? all the best Rob -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop

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

[Rails] Re: no implicit conversion of Symbol into Integer

2019-10-22 Thread Rob Jonson
yup - sounds like you have nailed that one. As you say; The error here is in trying to implicitly convert a symbol into an integer. Isn't it great how Rails (ruby) helps you out. > 4 <%= f.text_area > [:item][:item_item_property][ip.name.downcase.to_sym] %> > > -- You received this

Re: [Rails] Re: WebRtc chat app with Rails 6

2019-10-16 Thread Rob Jonson
On Tuesday, 15 October 2019 18:54:49 UTC-7, fugee ohu wrote: > > Thanks Can you show me where I would use the room: value pair elsewhere to > limit the chat to the intended 2 users only guess what; The Rails Action Cable guide talks about authorization

[Rails] Re: WebRtc chat app with Rails 6

2019-10-11 Thread Rob Jonson
https://lmgtfy.com/?q=how+to+%20use+websockets+in+rails and for those new to fugee who think this is a little harsh https://groups.google.com/forum/#!searchin/rubyonrails-talk/fugee%7Csort:date I don't think you'll find a single question where the smallest amount of effort has been shown before

Re: [Rails] Carrierwave metadata for original creation date?

2019-09-25 Thread Rob Biedenharn
s/Web/API/File> https://developer.mozilla.org/en-US/docs/Web/API/File/lastModified <https://developer.mozilla.org/en-US/docs/Web/API/File/lastModified> -Rob -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from t

Re: [Rails] ActiveStorage links are too long!

2019-08-12 Thread Rob Jonson
> > Also, I just found out, the long link is always a redirect to the App to > get a temporary link to a storage service, so it won't be cached by > browsers, ever. Jeez... > > Looks like ActiveStorage is a unique tool for certain things in Basecamp, > not a Carrierwave substitute. Am I right

Re: [Rails] How do I group and order by a model without loosing includes() method benefits

2019-06-06 Thread Rob Biedenharn
This probably works: relation = Project.joins(:bids).group(Arel.sql('projects.id')).order(Arel.sql('count(bids.id) DESC')) However, you might have to play around with it a bit if you need to put the `.includes(:bids, :user)` back in (or take the 1+N hit) -Rob > > On 2019-Jun-6, at

[Rails] [Job] Experienced Rails dev in South Africa

2019-05-24 Thread Rob Jonson
. drop me a line if you'd like an intro. Please - no agencies or dev shops. cheers, Rob -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to r

[Rails] Is there a process for pull requests that are not progressing?

2019-05-13 Thread Rob Jonson
a different pair of eyes. thoughts? cheers, Rob -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.co

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] Database dump and import

2019-03-10 Thread Rob Jonson
> > bundle exec rails db:schema:dump does this dump the data, or just the schema? I would assume just the schema - and that to transfer the data you'll need to use something like the solutions here: https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#MySQL --

[Rails] Devise

2019-02-25 Thread Rob Jonson
What problem are you having? I have always found it worked pretty much out of the box (assuming you have set up your mail config) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails

[Rails] Re: Objects in S3 Bucket

2019-02-16 Thread Rob Jonson
On Saturday, 16 February 2019 04:27:51 UTC, David Merrick wrote: > > Is there a way stop logged in users copying and pasting resources in a S3 > Bucket to other people? > The easiest way to handle this is to deal with the doc through ActiveStorage where you let rails upload it into an amazon

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

2019-02-11 Thread Rob Jonson
r if you don't include the standard js includes) When I started writing Rails, it was normal to consider that a meaningful proportion of your customers would not have js, and write the app to handle that case. Today, I certainly wouldn't waste time coding for the 'what if they don't have js' scenario. chee

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] Building basic airline reservation system with Ruby on Rails

2019-02-11 Thread Rob Jonson
hat - it sounds like you might be jumping ahead. What you're trying to do is probably going to be covered in your next module! enjoy, Rob -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and s

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] Is there an administrator on this list?

2019-02-06 Thread Rob Biedenharn
Well, to be quite pedantic, fugee is more or a "help vampire" than a troll. [ https://www.urbandictionary.com/define.php?term=help%20vampire ]( https://www.urbandictionary.com/define.php?term=help%20vampire ) -Rob B. (different from Rob J.) -Original Message----- From: &

Re: [Rails] Is there an administrator on this list?

2019-02-06 Thread Rob Jonson
e needs to work on their > google-fu. > > On Wed, Feb 6, 2019 at 6:32 AM Rob Jonson wrote: > >> If so, I have a request: >> >> I'm fed up of one persistent individual spamming the list with questions >> along the lines of >> >> 'Please do my work for

[Rails] Is there an administrator on this list?

2019-02-06 Thread Rob Jonson
ist. If there is no administrator, then my request to everyone else is to treat this like trolling, and just stop feeding the troll. thanks, Rob -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and s

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

[Rails] Re: Should I use passenger in production

2019-01-14 Thread Rob Jonson
On Sunday, 13 January 2019 19:38:10 UTC, fugee ohu wrote: > > What do I need it for besides being able to restart apps > http://lmgtfy.com/?q=what+does+rails+passenger+do -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe

Re: [Rails] Re: Logging in as a seeded user in an OmniAuth app

2019-01-11 Thread Rob Jonson
y 10, 2019 at 4:43:59 PM UTC-6, Rob Jonson wrote: >> >> bypass_sign_in is intended to be used from a controller where you'll have >> access to things like 'session' >> I suggest you start by getting it working in the intended environment >> before you try to pull it o

Re: [Rails] Re: Logging in as a seeded user in an OmniAuth app

2019-01-10 Thread Rob Jonson
bypass_sign_in is intended to be used from a controller where you'll have access to things like 'session' I suggest you start by getting it working in the intended environment before you try to pull it out into a standalone script. On Thu, 10 Jan 2019 at 22:16, Jason Hsu wrote: > OK, I'm trying

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:

[Rails] Re: Logging in as a seeded user in an OmniAuth app

2019-01-08 Thread Rob Jonson
looks like that example is using devise, so you can bypass signin (after checking authorisation) https://www.rubydoc.info/github/plataformatec/devise/Devise%2FControllers%2FSignInOut:bypass_sign_in or see:

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

[Rails] Re: Alternative to Heroku

2018-12-01 Thread Rob Jonson
se a digital ocean space or use a third party like AWS. The last two will take a bit of setup though. If you check them out on this link: https://hatchbox.io/?via=rob then I'll get a referral bonus. If you use the naked URL - I won't! I have written about my experience here https://medium.com

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] mailboxer vs action cable chat

2018-11-26 Thread Rob Jonson
> > >> > I'm adding chat to my sn site that already uses mailboxer What to do? >> >> Hire someone who has some rails experience and doesn't just post on newsgroups hoping that a stranger will do their work for them. More specifically: You'll have a much better experience developing an app if

[Rails] Re: rails vs. nodejs

2018-11-15 Thread Rob Jonson
> > I think rails is the best framework out there. But I think all these > frameworks do not solve any actual problems. They just abstract > problems to simpler forms. > Can I assume you'll be going back to writing assembly then? Or will you be sticking with pure machine code? -- You

[Rails] Re: RoR for poor farmers in Africa

2018-11-14 Thread Rob Jonson
, Rob -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyon

[Rails] Re: incorrect string value

2018-11-09 Thread Rob Jonson
On Monday, 5 November 2018 19:19:00 UTC, fugee ohu wrote: > > I imported some sms messages with emoticons in them and even though I'm > setup for utf8 encoding such as foreign languages, these emoticons raise > 'incorrect string value' error >

Re: [Rails] why is HTTP_HOST set to "wrong" value on 2nd nginx server ?

2018-11-09 Thread Rob Jonson
://hatchbox.io?via=rob <https://hatchbox.io/?via=rob> -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegro

Re: [Rails] Why SPAs are usually a waste of time/money

2018-11-06 Thread Rob Jonson
> > I notice basic staple sites like gmail rely on real time technologies like > let's say React and ActionCable so things going to follow the need for real > time > gmail is a massive complex, hugely expensive site that is built by a large engineering (and management) team. It is painful

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] Re: What is the right way to use find_or_create_by to avoid duplicate records in Rails 5.2 API app

2018-10-10 Thread Rob Jonson
> > > > Thank you very much, Rob ! I will add a unique index to Users#username > column (I had one but without *unique* option). > What about wrapping the call into transaction ? Will it be correct to call > *retry* ? If I got it right, retry will take another call to >

[Rails] Re: What is the right way to use find_or_create_by to avoid duplicate records in Rails 5.2 API app

2018-10-10 Thread Rob Jonson
You need to enforce the uniqueness at the database level, then catch errors. https://robots.thoughtbot.com/the-perils-of-uniqueness-validations More info on transactions here: https://makandracards.com/makandra/31937-differences-between-transactions-and-locking iiuc - transaction enforces that

[Rails] Re: Proper Coding Question

2018-10-05 Thread Rob Jonson
again - taste and preference here. my issue with `policy_scope(User)` in the view isn't that it is complex code, clearly it isn't. it's more that I don't want my view to know or care about authorisation. I think when you're talking about a select 'policy_scope(User).collect', you're asking

[Rails] Re: Proper Coding Question

2018-10-04 Thread Rob Jonson
Hi John, firstly - I don't know pundit, so this is only general advice. secondly - we're definitely in the realm of taste and preference here rather than 'ok' and 'not ok' having said that, my two pence: the rails style guide says 'Never call the model layer directly from a view'

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] Why doesn't anyone answer my question am i blacklisted?

2018-09-30 Thread Rob Jonson
> > >>> (a) Perhaps no one knows the answer. >>> (b) It's a weekend. >>> >> >> >> (c) You ask so many questions that are often not easy to understand that >> many do not bother trying any more. >> >>> >>> How do i render an xml view like index.xml.erb or index.xml.builder d) Your question is

[Rails] Re: Cache is running query on view fragment cache hit anyway

2018-09-30 Thread Rob Jonson
Possibly related: Rails 5 has new (improved) behaviour for collection caching <%= render partial: :post, collection: @posts, cached: true %> will cache although <%= collection: @posts, cached: true %> will not cache more info on how it works and the benefits here:

[Rails] Using third party Auth to meld rails and wordpress- any experiences?

2018-09-21 Thread Rob Jonson
Hi Folks, I'm considering an app design where we use Wordpress for the public pages, and Woo Commerce to handle memberships/subscriptions. (Wordpress + Woo Commerce seem really well set up for a plug & play setup.) We'd use a rails app for the custom work once the user was logged in. I'm

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

[Rails] Re: how does gmail show new messages as they arrive

2018-09-16 Thread Rob Jonson
The rails way to do this (update page when stuff happens at the server) is ActionCable https://guides.rubyonrails.org/action_cable_overview.html It runs on websockets and allows the server to push information to the browser. Your javascript on the page then needs to know what to do with that

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] Re: Horrible migration path?

2018-08-23 Thread Rob Jonson
the main change here is the rails version. Once you figure out the update requirements for that - the apache / ruby / passenger changes are (probably) a non-issue. the key question is whether you have test coverage on the original app. If you do, then I'd be tempted to do a big-bang update.

[Rails] Re: Easiest way to deploy to VM?

2018-08-17 Thread Rob Jonson
a pretty good server from Digital Ocean for the same. $30/month saves a lot of hassle when you release an update - you just push it to your master branch in git (or whatever branch you choose) and it updates automatically. read more here https://hatchbox.io/?via=rob (remove the via=rob if you don't

[Rails] Re: Best OS for production self hosting

2018-08-06 Thread Rob Jonson
and much cheaper. I have found they have almost exactly what I need out of the box. Reddis, choice of database, nginx running http2 and https, sidekiq, action cable, etc https://hatchbox.io?via=rob (link gives me referral credit) cheers, Rob On Saturday, 4 August 2018 20:15:28 UTC-5, fugee

Re: [Rails] lookups in array

2018-05-15 Thread Rob Biedenharn
t;} [5] pry(main)> Hash[STATE_TYPES].invert['OH'] => "Ohio" You might also want to look up Array#assoc and Array#rassoc which will operate directly on your array of pairs: [6] pry(main)> STATE_TYPES.rassoc('OH') => ["Ohio", "OH"] [7] pry(main)> STATE_T

Re: [Rails] [ANN] [PRIZE] Docker for Rails Developers - beta launch

2018-05-07 Thread rob
> >> * it has made me rethink the way in which I develop applications.* >> >> >> *Free prize draw*... For your chance to win a free copy, include the >> following in a tweet “ >> https://pragprog.com/book/ridocker/docker-for-rails-developers #Docker >>

Re: [Rails] Can you plz, explain to me part of this code ?

2018-04-26 Thread Rob Biedenharn
ot;, "AB_50",].map {|x| x[/\d+/]} => ["1020", "950", "50"] [2] pry(main)> ["AB_1020", "AB_950", "AB_50",].map {|x| x[/\d+/]}.sort => ["1020", "50", "950"] [3] pry(main)> ["AB_1020",

[Rails] [ANN] [PRIZE] Docker for Rails Developers - beta launch

2018-04-25 Thread rob
or your chance to win a free copy, include the following in a tweet “https://pragprog.com/book/ridocker/docker-for-rails-developers #Docker #Rails #RoRTalk @robisenberg” — one winner will be chosen at random. Cheers, Rob p.s. any other help to spread the word would be much appreciated! -- You r

Re: [Rails] How to monitor feature usage

2018-03-16 Thread Rob Jonson
examples: 1) visited the dashboard (identified by a url, controller/action) 2) clicked on a button that showed a 'you need to upgrade to use this feature' message (no interaction with the server) in both cases, it would be easy for me to call some js code log_feature(user_id,feature_name) t

[Rails] How to monitor feature usage

2018-03-15 Thread Rob Jonson
Hi Folks, I'd like to be able to answer questions like 'over the last week, what proportion of my users used feature XXX' or even 'over the last week, what proportion of active users used feature XXX' can anyone recommend a service / gem / pattern to help me do this? cheers, Rob -- You

Re: [Rails] help: ActionController::UnknownFormat in FooController#index

2018-03-05 Thread Rob Biedenharn
index', via: [:get] , :mode=>{:x=>' whatever ',:y=>1} , constraints: { seoterm: /.+/ } so that :seoterm slurps all the remaining characters of the URL. This breaks the "implicit" (.:format) that gets added because the constraint will match the '.' and everything after it

[Rails] Re: Questions about @dhh code on Writing Software Well for Controllers

2018-03-05 Thread Rob Jonson
the top example looks really clear to me. I can see immediately what it is doing and why. there is almost no duplication and it is doing 'controller-type' work. what don't you like about it? On Sunday, 4 March 2018 15:12:23 UTC, David McDonald wrote: > > I was struck recently by how simplified

[Rails] Re: Telling users there is maintenance happening

2018-02-24 Thread Rob Jonson
If you're using capistrano for deployment (it's great!) - then this is a good option > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [Rails] Re-starting from 5: suggestions needed

2018-02-24 Thread Rob Jonson
Rails is a pretty old and mature project - one of the great things about that is that you don't have to flit from one tech to the next. There are good solid libraries that have been around for years and will probably be around for many more. devise for authentication simple_form (or similar)

Re: [Rails] find_or_create_by rolls back

2018-02-01 Thread Rob Biedenharn
s_many :addresses, through: :relationships > has_many :cars, through: :relationships > attr_accessor :address_id > attr_accessor :person_id > attr_accessor :car_id > attr_accessor :picture_id > def formatted_name > "#{last_name}, #{first_name}, #{middle_

Re: [Rails] protect_from_forgery error not manifesting in test environment

2018-01-29 Thread Rob Jonson
thank you > > There's this setting (in "config/environments/test.rb" for test env): > > config.action_controller.allow_forgery_protection = false (default for > test env) > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To

[Rails] protect_from_forgery error not manifesting in test environment

2018-01-29 Thread Rob Jonson
with javascript enabled. In the test, I don't get the exception. can anyone explain why? thanks, Rob -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, sen

[Rails] Caching, Collections, Rails 5, multiple views colliding

2017-11-30 Thread Rob Jonson
Things, "list" ] } and cached: [myThings, "list" ] but those were really just guesses as I don't understand the logic I'm running rails 5.0.6 can anyone help? thank you. Rob -- You received this message because you are subscribed to the Google Groups "Ruby

Re: [Rails] routes

2017-09-12 Thread Rob Biedenharn
/:id(.:format) galleries#update PUT/galleries/:id(.:format) galleries#update DELETE /galleries/:id(.:format) galleries#destroy Note the routes for index, create, and new ^^ -Rob > > On Tuesday, September 12, 2017 at 5:03:56 PM UTC-4, Colin L

Re: [Rails] confused

2017-07-11 Thread Rob Biedenharn
, :condition => report_config.slider_order[i.condition][1], :full_note => full_note.join("\n").strip, :description => i.description, :trade => i.trade, :flagged => !i.require_maintenance.blank? } } } output.reject(&:empty?) -Rob -- Y

Re: [Rails] acts_as_commentable_with_threading

2017-06-29 Thread Rob Biedenharn
> On 2017-Jun-29, at 10:59 , fugee ohu <fugee...@gmail.com> wrote: > On Wednesday, June 28, 2017 at 10:09:25 AM UTC-4, Rob Biedenharn wrote: >> On 2017-Jun-28, at 01:51 , fugee ohu <fuge...@gmail.com <>> wrote: >> >> On Monday, June 26, 2017

Re: [Rails] acts_as_commentable_with_threading

2017-06-28 Thread Rob Biedenharn
> On 2017-Jun-28, at 01:51 , fugee ohu <fugee...@gmail.com> wrote: > > On Monday, June 26, 2017 at 9:43:19 AM UTC-4, Rob Biedenharn wrote: > At this point, you should be able to look around a small codebase like this > and figure it out, but here are the "hints

Re: [Rails] acts_as_commentable_with_threading

2017-06-28 Thread Rob Biedenharn
> On 2017-Jun-28, at 01:49 , fugee ohu <fugee...@gmail.com> wrote: > > > > On Monday, June 26, 2017 at 9:43:19 AM UTC-4, Rob Biedenharn wrote: > At this point, you should be able to look around a small codebase like this > and figure it out, but here are the "

Re: [Rails] acts_as_commentable_with_threading

2017-06-26 Thread Rob Biedenharn
working, point to a specific thing and ask a more directed question. -Rob P.S. The routes could easily be amended to be: resources :comments, except: [:new] > On 2017-Jun-25, at 22:04 , fugee ohu <fugee...@gmail.com> wrote: > > I'm looking at the Dustin Fisher example app

Re: [Rails] changing mysql engine and options in schema.rb

2017-04-10 Thread Rob Biedenharn
populate data, but that is typically minimal to get the system bootstrapped. Loading data from some other source is probably best approached as a stand-alone script that can be run once. -Rob > > You seem to be going at this all sideways. When you stand up a server, you > run the m

Re: [Rails] changing mysql engine and options in schema.rb

2017-04-07 Thread Rob Biedenharn
ARSET=utf8 PRIMARY KEY=ID AUTOINCREMENT" do |t| > thanks in advance Here's an idea for you: Run the migration and then look into the db/schema.rb file and compare that to the migration and to the actual database table. It would save time for everyone if you tried some of this yourself an

Re: [Rails] update query

2017-03-03 Thread Rob Biedenharn
hat column to all lowercase. > > any ideas? Note that "Startdate=" remains as a suggested alternative. I'd start by searching your code for the case-sensetive 'Startdate' -Rob -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&qu

Re: [Rails] vertical align a link_to(image_tag

2017-03-02 Thread Rob Biedenharn
ogo.png")), '/' , {:class => "logo"} %> Actually, that's your ERB, not the HTML Did you mean to have redundant () around the image_tag("logo.png")? Also, that class is on the resulting tag, not the img so that might make a difference if there's other CSS that affects im

Re: [Rails] ruby embedded conditionals

2017-02-09 Thread Rob Biedenharn
gt; | <%= cart.product_id %> | <%= 'Processing order' if cart.processing == 'true'%> Also, why is cart.processing returning a string? (Or why are you testing the value is 'true'?) It would be more natural to have cart.processing? be truthy. -Rob -- You received this message because yo

Re: [Rails] local sqlite development vs Heroku PG deployment

2017-02-01 Thread Rob Biedenharn
t being found on production, but they are there in development >> and they are on my github repo. >> >> Heroku logs are not very useful either. :( >> >> Any suggestions? > > Are you using capital letters in your table names? You're going to have

Re: [Rails] Calling 'sanitize' on collection_radio_buttons text_method

2016-10-27 Thread Rob Biedenharn
he Answer#text to return .sanitize'd strings: class Answer include ActionView::Helpers::SanitizeHelper def text sanitize <http://apidock.com/rails/ActionView/Helpers/SanitizeHelper/sanitize>(read_attribute(:text), tags: %w[sub sup]) end end I think that this will work, but I haven'

[Rails] Re: Saving child attributes via nested_attributes doesn't automatically touch the parent?

2016-10-06 Thread Rob Cameron
Back to Rails! https://github.com/rails/rails/issues/26726 TL;DR Adding a before/after_commit/rollback hook causes the parent not to be touched when saving via nested attributes. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To

[Rails] Re: Saving child attributes via nested_attributes doesn't automatically touch the parent?

2016-10-06 Thread Rob Cameron
found that as soon as I commented out has_paper_trail the parent was being touched as expected! I'll update once I look into it. Rob On Thursday, October 6, 2016 at 9:23:50 AM UTC-7, Rob Cameron wrote: > > I "discovered" some interesting functionality today. Let's say you

[Rails] Saving child attributes via nested_attributes doesn't automatically touch the parent?

2016-10-06 Thread Rob Cameron
e internet that explicitly points out this functionality: http://www.software-thoughts.com/2014/03/rails-updating-association-through.html The single comment on that post says "just use :touch => true" which is what I assumed worked as well! Rob -- You received this message because you

[Rails] Feedback wanted: Docker for Ruby/Rails Developers book

2016-08-09 Thread rob
Hey! I’m working on a new book on Docker, aimed at Ruby/Rails devs. I’d love to get some input from other developers who have heard about or dabbled with Docker, but aren’t using it regularly. I’ve written a tiny survey (literally only 1 question). I’d really appreciate it if you’d share your

Re: [Rails] incorrect number of arguments

2016-06-29 Thread Rob Biedenharn
atus: > :unprocessable_entity } > else > redirect_to root_path > end #(end 4) > end #(end 3) > end #(end 2) Where is "end 1"? Your indentation is hiding the problem from you as the "unless..." isn't indented further tha

Re: [Rails] Sending parameters to controller using link_to but getting the variable name itself.

2016-06-22 Thread Rob Biedenharn
a generated form. As others have said, you'll need to do some Javascript (perhaps with a library like jQuery) to get the value of a field at the time the link is clicked without using a form. -Rob > in the controller I printed member_code to verify whats the value I'm getti

Re: [Rails] Site map url with protocol (https)

2016-05-23 Thread Rob Biedenharn
uot; It doesn't get much simpler than that. (I've never used this gem, but if you read a lot of Ruby source, these things start to become more apparent.) -Rob -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscrib

Re: [Rails] Moving a ruby/rails app from one server to another

2016-04-14 Thread Rob Biedenharn
was current so it's not likely present unless someone introduced it. At the very least, you could update rails to 2.3.18 (the last of its lineage). In a Gemfile, that would be: gem 'rails', '~> 2.3' The `will_paginate` gem does not support Rails 4 (unless that has changed somewhat rec

Re: [Rails] XML API as model in Rails application

2016-04-14 Thread Rob Biedenharn
calculations in model, is this right? Basically, model > would consist of login, getDomainInfo and getContactInfo commands sent to our > domain registrar EPP API. > > Thanks, > > -- Sounds like you might want to look at https://github.com/weppos/whois <https://github.com/wep

[Rails] Re: Reg: Heroku sending mails from Rails App

2016-02-25 Thread Rob Lane
I use send grid myself, good docs available on Heroku for this setup - https://devcenter.heroku.com/articles/sendgrid On Wednesday, February 24, 2016 at 10:39:00 PM UTC-8, VIDYA SAGAR POGIRI wrote: > > Hi I deployed one small app in heroku built on ROR , now i want to send > mails .How is it

[Rails] Re: Dynamic Data in Highcharts

2016-02-25 Thread Rob Lane
So in your _chart8 partial you are populating chart.series.data using the proved startdate and enddate variables. You will want to change these values when your ajax function returns data meaning you should first persist your chart object instead of just creating it without assignment.

  1   2   3   4   5   6   7   8   >