#RubyOnRails - 26 December 2018
« Back 1 day Forward 1 day »
[11:20:53] syndikate: Do we use son serialisers for non model object? My API has to return a value( integer ) and I can't figure how I would create a serialiser for it. Should I be using jsonapi then I can't create it for an object with no model associated
[11:21:25] syndikate: Just creating a placeholder model object seems overkill and also it won't have a unique id
[12:42:16] fox_mulder_cp: syndikate: i create non Activerecord-related model and use it for creating json in active model serializers
[13:47:21] IGnorAND: can we in rails also make vue.erb files and use things like link_to in the vue files?
[14:05:48] dionysus69: I have a naming dillema, I have an object named Address, it should have couple fields, one of them is the address itself, how should I name that field? Address.first.address doesnt feel write
[14:08:49] sevenseacat: as in, the street address? normally I would store addresses with line1, line2, etc.
[14:19:45] dionysus69: its more like a bitcoin address, address has 2 values basically, the address and balance :)
[17:04:32] Andr3as: hello all.. i wonder what i do wrong here.. i cannot seem to have a fontwaesome icon in a button_to call..? it ends up rendering as text
[17:07:18] Andr3as: the left one is using link_to, the right one uses the button_to https://abload.de/img/2018-12-26_12-06mrcub.png
[17:09:30] tbuehlmann: Andr3as: can you paste the code which generates the button? I assume you're using the method incorrectly
[17:10:00] Andr3as: tbuehlmann: <%= button_to icon('far', 'eye'), new_signal_read_path, remote: true, class: 'read-link' %>
[17:14:27] Andr3as: tbuehlmann: just to clearify.. i meant i am using the button_to method as above.. and it aint working.. i cant find my mistake..
[17:15:34] tbuehlmann: using the block syntax might work as well: <%= button_to new_signal_read_path, remote: true do %><%= icon('far', 'eye') %><% end %>
[17:18:37] Andr3as: https://github.com/FortAwesome/font-awesome-sass/blob/master/lib/font_awesome/sass/rails/helpers.rb
[17:42:25] Andr3as: yeah, but they stopped at 4.7'ish or something.. i thought, i new project deserves the newest icons ;)
[19:10:17] carlosd: is there any instructions on how to run activestorage tests for the different services (s3, gcs, etc)?
[22:21:52] fugee: using capybara, when i run visit <url> in rails console, rails complains no such route