Re: [Rails] How to start contributing to the Rails code?

2018-03-15 Thread Rolandas Barysas
You can find all information about contributing here: http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html On Thu, Mar 15, 2018, at 01:52, Lucas Oshiro wrote: > Hello, > > My name is Lucas, and I'm an undergraduate Computer Science student at > University of São Paulo, in Brazil.

Re: [Rails] Fixtures with Active Storage

2018-03-02 Thread Rolandas Barysas
For the record, I haven't found a good solution with fixtures, so I made avatars optional and uploads creating dynamically inside integration tests. On Tue, Feb 27, 2018, at 20:50, Rolandas Barysas wrote: > Hey all, > > Has anyone had any luck creating fixtures for Active Storage upl

[Rails] Fixtures with Active Storage

2018-02-27 Thread Rolandas Barysas
Hey all, Has anyone had any luck creating fixtures for Active Storage uploads? I wouldn't mind creating uploads in integration tests, but because my User model has_one_attached :avatar and it always has to be present, all my integration tests fail due to non-existent user avatar in my header

Re: [Rails] Why do I see includes often named with the suffix "able" in model files?

2018-02-15 Thread Rolandas Barysas
I believe suffix is generally used when you're using polymorphic associations (for example, you may have Comment model that belongs_to :commentable). In DHH's video, I believe it's the case, because recordable is most likely used for variety of models in BC3. On Thu, Feb 15, 2018, at 15:46, David

Re: [Rails] Form validation Rails 5.1.4

2018-01-29 Thread Rolandas Barysas
form_with by default generates form which is submitted by an XHR request. This is why it seems that nothing happens, but if you look to the console output, you'll see that form was actually submitted. You can make form_with to submit by a standard page refresh by using 'local' option: <%=

Re: [Rails] multi-tenancy

2018-01-22 Thread Rolandas Barysas
This is how I approached multi-tenancy in my application: Every user can be a part of one or multiple accounts (groups) through membership model. And because someone has to be in charge of the account (pay bills, admin stuff, etc), membership model has a boolean flag is_owner. In application, all

Re: [Rails] div hidden but still showing up in source

2018-01-19 Thread Rolandas Barysas
Because .hide() does not remove element, but hides it. Use .remove() if you want to remove element from the DOM tree. On Sat, Jan 20, 2018, at 05:34, fugee ohu wrote: > I hid a div in a form using jquery hide element, it's no longer > visible on the page view, but it still shows up in source

Re: [Rails] Mail server

2017-09-07 Thread Rolandas Barysas
the email a month and per day ??? > > On Thursday, September 7, 2017 at 1:26:47 PM UTC+5, Rolandas Barysas wrote: >> >> Rails does not provide a system to create a mail server, because that is >> a completely different thing and not a part of the web framework. >> >

Re: [Rails] Mail server

2017-09-07 Thread Rolandas Barysas
Rails does not provide a system to create a mail server, because that is a completely different thing and not a part of the web framework. I personally use https://www.mailgun.com/ - they give 10,000 emails a month for free, you might want to check them out. On Thu, Sep 7, 2017 at 6:14 AM, Aqib

Re: [Rails] Dependencies

2017-09-05 Thread Rolandas Barysas
What do you have in mind specifically? I can't recall the last time where I had any issues with bundler. On Tue, Sep 5, 2017 at 3:07 PM, Joe Guerra wrote: > I'm trying to resolve some dependancies issues in my rails app. > > How do you resolve these issues typically? > >

Re: [Rails] Migrations

2017-09-05 Thread Rolandas Barysas
People might have different opinions about this, but this is what I do: If website is not deployed yet, then whatever, you can edit or delete existing migrations, then destroy current database and run `rails db:migrate` to rebuild database schema. I do this from time to time when trying out

Re: [Rails] devise translation keys not built into views

2017-08-28 Thread Rolandas Barysas
gee...@gmail.com> wrote: > > > On Monday, August 28, 2017 at 2:06:26 PM UTC-4, Rolandas Barysas wrote: >> >> Read Rails internationalization guide: http://guides.rubyonrai >> ls.org/i18n.html >> >> On Mon, Aug 28, 2017 at 8:46 PM, fugee ohu <fuge...@gmail.com>

Re: [Rails] devise translation keys not built into views

2017-08-28 Thread Rolandas Barysas
Read Rails internationalization guide: http://guides.rubyonrails.org/i18n.html On Mon, Aug 28, 2017 at 8:46 PM, fugee ohu wrote: > I can generate views and translations but how do i generate views with > keys instead of static text? I have to edit my vies to put in the keys

Re: [Rails] navbar toggle not showing

2017-08-26 Thread Rolandas Barysas
>From code you provided I assume you're using Bootstrap 3. Do you have this inside element? There's a working example in Bootstrap's documentation - https://getbootstrap.com/docs/3.3/components/#navbar. On Sat, Aug 26, 2017 at 4:41 PM, fugee ohu wrote: > > >

Re: [Rails] rails install on live server

2017-08-26 Thread Rolandas Barysas
This is not a Ruby or Rails issue, but it's your Linux distribution. You should ask your question in https://askubuntu.com/questions. After you get this resolved, I would recommend to follow some tutorial how to correctly install Ruby and deploy your Rails application - you can google something

Re: [Rails] Good version to use in a production enviroment

2017-08-23 Thread Rolandas Barysas
Hey, I think it's safe to say that current newest stable releases (Ruby 2.4.1 and Rails 5.1.3) should work fine on production. Been running them for a while without any issues. Some production websites even run on Rails master (I think Basecamp is one of them). In terms of future strategy,

Re: [Rails] PGconn.connect .... where is disconnect?

2017-08-20 Thread Rolandas Barysas
Have you tried conn.finish()? http://www.rubydoc.info/gems/pg/0.11.0/PGconn:finish > On 16 Aug 2017, at 03:32, Ralph Shnelvar wrote: > > I may have a large group of (Devise) users each of whom is a separate > Postgres user, e.g. SomePostgresRole01, SomePostgresRole02, etc. >