...will raise an exception! On the other hand the select method allows you to include additional data in your models such as the results of MySQL functions. Those function resulst...

...posts.*, MAX(comments.created_at) AS latest_comment_at").joins(:comments).group("posts.id") Here we included the date of the latest comment of each post using the MySQL MAX function combined...

...data for AWSAccessKeyId and Signature being used within the URL. So you should not include those links within views but only when the document is requested, i.e. link to attachments...

dev.mysql.com

...the condition of your network if this error occurs frequently. If the error message includes during query, this is probably the case you are experiencing. Sometimes the during query form...

github.com

Barby is a great Ruby gem to generate barcodes of all different sorts. It includes support for QR codes via rQRCode; if you need to render only QR codes, you...

...means there won't be a pretty sign-in form any more which would include a link for sign-up or password reset. Sign-up would be easy to solve...

When you have a Pull Request on GitHub that includes commits from another Pull Request, you will still see them after the "child" PR has been merged. Unfortunately, GitHub won...

...to automatically replace the content of $('#id'). To do the same in Rails 3, include usual rails-ujs JavaScript, and put this into your application.js: $(function() { $('[data-remote][data-replace...

github.com

...We create a new class ContactFilter that will describe the searchable columns: class ContactFilter include Minidusen::Filter filter :text do |scope, phrases| columns = [:name, :email] scope.where_like(columns => phrases)

...HTTP/1.1 200 OK ... ✔ > curl -i --tlsv1 https://www.econda-monitor.de/els/logging HTTP/1.1 200 OK ... curl -i includes the protocol headers in the output, so you'll see the response's status code...

...means that you want a pattern to be preceded by another pattern, but not include the preceding pattern in your match or search cursor. E.g. (?<=x)y matches y in...

makandra dev

...a thread which caused the application to stop responding. Rails 4.x ActiveSupport::Dependencies includes logging support. It is easy to use: ActiveSupport::Dependencies.logger = Rails.logger Rails 5+ Logging support was...

...s matching strategy globally to :prefer_exact. This will positively affect all you steps (including those of gems like Spreewald) as it prevents the Capybara::Ambiguous error in the edge...

...case when two fields are matching the given name, but one of the matches includes the name only as a substring, Capybara.match = :prefer_exact

stackoverflow.com

...for now, it shows a deprecation warning. Since Rails 3.2.14 and 3.2.15 did not include security updates, you might not have applied them and probably now encounter these deprecation warnings...

...logic how to roll back the initial migration.\ So, in your new migration, just include the old one and call it: require 'db/migrate/20120201031337_add_population_to_destinations' class DropPopulationFromDestinations < ActiveRecord::Migration def self.up AddPopulationToDestinations.down...

solnic.eu

...cool example. It allows you to inject some state into the module you are including elsewhere. Check it out! class AttributeAccessor < Module def initialize(name) @name = name end def included...

define_method(@name) do instance_variable_get("#{ivar}") end end end class Book include AttributeAccessor.new(:title) def title "#{super} + super works!" end end book = Book.new book.title = "Module Subclassing Guide...

github.com

JavaScript structures that include circular references can't be serialized with a"plain" JSON.stringify. Example: a = { name: 'Groucho' }; b = { name: 'Harpo', sibling: a }; a.sibling = b; Doing a JSON.stringify(a) will...

httpd.apache.org

Adding that to your site's vhost will create log files that include the current date in their name, like access.2011-04-20.log, without any need to restart the web server...

...modified_at" DESC NULLS LAST, "title"; PostgreSQL will only use your index, if it includes all columns, and all columns are order correctly (or if all columns are ordered reversely...

...but its contents will be kept. $container.html() // returns " Hello World" Also note that contents() includes text and comment nodes which is essential for this approach to work. jQuery usually won...

When submitting textareas, browsers sometimes include carriage returns (\r) instead of just line feeds (\n) at the end of each line. I don't know when this happens, and most...

...is often useful in views where might think about writing [state_A, state_B].include? object.state (which you should not). Keep in mind that this will not call any validations...

...x), you need the mysql2 in a 0.2.x version. Newer versions no longer include the ActiveRecord adapter (which is part of ActiveRecord since Rails .1). So your Gemfile should...

...to its asset paths by default. This means that when you write this: <%= javascript_include_tag 'all.js' %> ... you always get the same path, regardless of the contents of all.js...

...validation in exactly this order ResourceController - here you have to be careful class PostController include ResourceController::Controller does 'post_controller/behavior' index.before { do_something } end module PostController::BehaviorTrait