...disabled, that all classes are already loaded when browser interaction takes place what makes rails able to find the class even without the namespace...

blog.jayfields.com

...these styles, and system will fail when passing it invalid arguments: system 'bundle exec rails server', '-p 3000' # fails and returns nil This is equivalent to running a command called...

...bundle exec rails" (including spaces in its filename). There is usually no such command anywhere on the $PATH. Note that you should prefer the 2nd approach (list of arguments instead...

...last_synchronized_at: nil, } } ) def validate_analytic_stats_against_json_schema @schema ||= File.read(File.join(Rails.root, 'app', 'models', 'project', "analytic_stats_schema_v#{analytics_stats_version}.json")) analytic_stats_errors = JSON...

...or by setting self.primary_key = "id" in your class definition. Related, but different issue: Rails 2 does not find an association when it is named with a string instead of...

...cassette for the request that fails Copy the request with all parameters Open a rails console, assign the request to a variable and unescape it: my_project> var = "%5B%7B...

...LIKE only takes a fraction of a second. This means when optimizing a typical Rails action, you should probably look further than the database. A view can easily take many...

stackoverflow.blog

...opensource.zalando.com/restful-api-guidelines https://www.merixstudio.com/blog/best-practices-rest-api-development/ https://www.oreilly.com/library/view/rest-api-design/9781449317904/ More topics in our deck: Rails: Rest API post-mortem analysis InfoQ: How to Design a Good API & Why it Matters

...iconfont-plugin-webpack that automate the font building. If you're still using the Rails asset pipeline, try the half-automatic approach. Webpacker Rails: How to integrate the plugin

...a model Signature with name: string, signature: text, you can use it with regular rails form like this: - form_for @signature, :html => { :class => 'signature_form' } do |form| %dl %dt = form.label...

In Ruby on Rails, all objects have a useful blank? method. It returns true for nil but also for empty strings or empty arrays. There is also a universal method...

...When dealing with geo data, you'd often use acts_as_geocodable for your Rails applications. There you can just use your model's upgraded find to achieve the same...

jqueryui.com

...into position[]=13&position[]=15, which neatly resolves to params[:position] == [13, 15] in Rails. Broken placeholder height When a dragged row does not have a set height but rather...

Obviously, this leads to problems when comparing strings: "Über".downcase == "über" => false In Rails you can use ActiveSupports' multibyte chars to avoid that problem. It gives you a wrapped...

...it really hard to make this work reliably. Also see Dynamically uploading files to Rails with jQuery File Upload...

github.com

...Minidusen, which extracts those parts from Dusen. Minidusen is compatible with MySQL, PostgreSQL and Rails 3.2, 4.2 and 5.0. If you are looking for a full text indexing solution, we...

...to invalidate Cloudfront cached assets, and Cloudfront will ignore the usual ?123456 timestamps that Rails uses by default. So to make sure Cloudfront will not server outdated assets, you have...

...to remember the password, give a form an autocomplete attribute with the value off: ... Rails example form_for @model, :html => { :autocomplete => "off" } do |form...

rubyforge.org

Under certain circumstances gettext_i18n_rails will hit a near-infinite loop. This occured in Rails 2.3.5 with Haml 3.0.18 and fast_gettext 0.5.10. gettext_i18n_rails's Haml-Parser...

This note describes how to kick a user out of a Rails application after she hasn't requested an action for a while. Note that this is different from deleting...

...node version that is older than mine. Every time I wanted to run my rails dev server I was asked to check my yarn integrity: error Integrity check failed

+ "systemParams": "linux-x64-64", "modulesFolders": [ "node_modules" ], - "flags": [], + "flags": [ + "checkFiles" + ], "linkedModules": [], "topLevelPatterns": [ "@rails/webpacker@4.x", There were also changes in node_modules/node-sass/vendor/linux-x64-64/binding.node. After I switched to the "correct...

...sub directories, make sure to add -r features to the standard Cucumber options. In Rails apps, Cucumber options are likely to be stored in config/cucumber.yml...

Here is how to do it without a server-side component (like a Rails application). Use JavaScript's navigator.language (real browsers and IE11+) and navigator.userLanguage (old IEs).

...You can "fix" this in multiple ways: Update your drivers on your machine with RAILS_ENV=test rake webdrivers:chromedriver:update Ignore the driver update-URL in your VCR configuration...

...and see if VCR complains: WD_CACHE_TIME=1 bundle exec cucumber Note: Newer Rails versions come with the webdrivers gem automatically...

We have two redundant auto-failover FreeBSD load balancers for our Ruby on Rails hosting setup that are connected to the Internet backbone with a 10GE interface pipe. All...

...other components are redundant, too. Interested? See http://railscomplete.de