#RubyOnRails - 01 September 2018
« Back 1 day Forward 1 day »
[09:15:29] jenenliu: hi, newbie here, I am trying to install rails 5.2.0, but I can't do it successfully, this is the command I run
[09:16:17] jenenliu: home/jenenliu/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem railties (>= 0.a) with executable rails (Gem::GemNotFoundException)
[10:39:51] gerep: Using "grouped_collection_select(:city, :country_id, @continents, :countries, :name, :id, :name)", is it possible to limit the :countries that are shown?
[10:41:05] gerep: My user is limited to just a few countries, not all. In my controller I can get the list of available countries like : current_users.countries
[10:45:28] gerep: I tried sending the countries names in a list like ["Australia", "Brazil", "Ireland"] (those are the ones allowed for the current user) but I get this error: is not a symbol nor a string
[13:44:20] josefhovad: Hi there. I have app with three namespaces for three user roles. I would like to use one layout, but different sidebar. My idea is to have something <%= yield :sidebar %> in the layout ... and then in main controller of each namespace send the particular partial of sidebar into this area of the layout. Anyway I'm not able to find how to do it and it's probably not the Rails way. Can you hint me how to have only one layout for whole app and three
[14:20:47] mjacob: i'm writing a spec for a helper that checks some specific path_parameter. i could modify controller.request.path_parameters, but instead i'd like to set some URL and have controller.request.path_parameters automatically set. is there a way to do this easily?
[15:08:13] rodd: Morning. I've created a many-to-many relationship using through as described here https://guides.rubyonrails.org/association_basics.html#choosing-between-has-many-through-and-has-and-belongs-to-many and rails/activerecord created each entity field representation in the join table in plural, "places_id" and "categories_id". Is that the normal behavior? inflector kicking in?
[15:09:11] rodd: I ask because when I try to create an association when creating a record using attributes, it gives: POST /places ... error: unknown attribute "place_id" for CategoriesPlaces
[15:39:00] jammanbo: Anyone have experience making a Devise/Warden failure app that maintains the subdomain of the attempted path and uses it when redirecting back after successful login?
[18:36:02] Applitect: So I'm working with a client's database and I've found that one of the fields in one of the tables is using the reserved word "attributes". Unfortunately, it would require a large amount of work to change the table name and recode the site to accept the new column name. Is there anything I can do in the Model to get around this??
[18:36:57] Applitect: A large majority of the application is built on PHP. But we're trying to move it to Rails section by section.
[18:37:28] Applitect: The current error I'm getting is.. "`instance_method_already_implemented?': attributes is defined by Active Record. Check to make sure that you don't have an attribute or method with the same name. (ActiveRecord::DangerousAttributeError)"
[20:46:18] rodd: regardind my question earlier today, I messed up in my migrations and used plural in t.belongs_to