rafaelfranca on master
Prevent TextHelper#word_wrap fr… Merge pull request #34488 from … (compare)
rafaelfranca on master
Indent guides as rails help com… Homogenize rails help output I… Merge pull request #34085 from … (compare)
rafaelfranca on 5-2-stable
Merge pull request #34106 from … (compare)
I made an endpoint on a controller, and I'm jsut doing curl -X POST http://localhost/endpoint
and I'm getting the error: ActionController::InvalidAuthenticityToken
I tried past recommendations of adding skip_before_filter :verify_authenticity_token
but this doesn't appear to work. ANy ideas?
skip_before_action
Arel::Table.new('db_name.schema_name.table_name').project(Arel.star).to_sql
,SELECT * FROM \"db_name\".\"schema_name\"
table_name
?
It's a general rule of thumb to only write unit tests when you are testing something that is not otherwise covered by tests for the library you're using. If you are simply enumerating which properties get serialized, and not performing any other transformation in said serializer, then don't bother writing tests
go it! thanks!
byebug
statement somewhere in your code and when the statement is reached you get the hand on the process.
require
it if it's not auto-loaded.
c
, n
, just type h
to display the byebug help).
list
is reserved by byebug ;)
A
references several other models B
, C
and so on. It goes from 1:1
, via 1:n
up to n:m
cardinality. Now, I would like to have a callback that I implement in model A
which tells me that an attribute in e.g. model B
changed. I would prefer to implement those hooks in the model A
to keep everything related to this in one place where it is maintainable. Is there any option to do this with rails-native callbacks? I only found solutions for adding and removing entities inside a relation but not if one of the existing ones changes. May you help me out? Thank you!
Hello, I'm using Rails / SPRockets,
For This File (application.js)
// = require libs/jquery-retina
// = require libs/jquery.popupoverlay
// = require libs/messg
// = require site_logic/application
// = require serviceworker-companion
// = require i18n
// = require i18n-rules
// = require lazysizes.min
// = require i18n
This file i18n.js doesn't exist in the current directory, however it's successfuly get into application.js
Hi guys! I'm trying to understand the magic of the preview mailer.
Can anybody give me a hint?
How this
url_for(controller: "mailers", action: "preview", path: "#{preview.preview_name}/#{email}")
becomes this ?
/rails/mailers/mailer_model/mailer_method
Routes are registered somehow but I cannot find how/where.
Thank you in advance! 🙂
rescue_from
, and no, changing the session store to ActiveRecord just for this is not viable
Error: Cannot find module '@babel/plugin-proposal-class-properties'