This feature allows for truncation of the post body text at a user-defined point for display on the home page. See the help text when creating or updating a post in Enki's admin area. Thanks to user mcary for his contribution. Conflicts: app/views/admin/posts/_form.html.erb app/views/posts/index.html.erb
Tag names can now only contain alphanumeric, underscore, space, dot and dash characters. Other characters will be filtered out, ampersands will be expanded to 'and'. This limitation has been enforced to avoid complications with routing where tag names are involved. Updated specs accordingly.
Tags can now be viewed in HTML and Atom format regardless of whether the tag name contains a dot character or not. The regular expression that matches tag names currently allows upper/lower case letters, numbers, dots, dashes, underscores and spaces (URL encoded or not). Updated relevant specs. Moved routing specs into posts_routing_spec.rb as this seems like a more fitting place for them.
When a tag name contains a dot character, Rails interprets this as the separator for a formatted route and splits the tag name into the section before the dot which is interpreted as the expected :tag parameter, and the section after the dot which is interpreted as an unexpected :format parameter. This commit restores correct behaviour in the event that a tag name contains a dot character and includes spec coverage. Fixes #93.
Rails now contains code that resets the session if the CSRF request forgery check fails. This was happening on the OpenID callback when logging in to the Enki admin area, which broke OpenID login. This commit disables the CSRF check only for OpenID callbacks when logging in to the Enki admin area. Fixes #91.
Added factory_girl factories for use with update specs on: admin/comments_controller_spec.rb admin/posts_controller_spec.rb
Start making use of the comment_params method in admin/comments_controller.rb. Removed author_url and author_email from the params whitelist in comments_controller.rb as according to the spec, these should not be able to be set from the front end anyway.
The move to Rails 4 and strong parameters necessitates whitelisting of parameters being processed by the controller. The exclusion of the :tag_list, :published_at_natural and :slug parameters from the whitelist means that these data are not being saved to the db and hence no new post will be displayed on the front end, no new tags will be saved and the post slug cannot be updated after initial creation. This commit fixes these issues.
relation to comments, pages and posts.
When reviewing my pull request, xaviershay requested these changes: * Use ActionController::Base.config.relative_url_root instead of ENV['RAILS_RELATIVE_URL_ROOT'] in the UrlHelper and rackup.ru * Mention the feature in the README, because it won't be found in config/application.rb Implement these, but use Rails.configuration instead of ActionController::Base.config, as it seems like the current Rails best practice.
When reviewing my pull request, xaviershay requested these changes: * Add hint to published_at field on admin post edit form * Favor '&&' over 'and' * Stop stubbing Chronic.parse unnecessarily Implement these changes.
I run my blog in a subsdirectory of my web server. That is, instead of blog.example.com, I use example.com/blog. Rails 3 no longer supports that as an out-of-the-box configuration option. (There is an action_controller.relative_url_root key, but it doesn't handle asset helper paths or, under some servers, the top-level route rewriting.) Tweak routing and URLs in several places: * config.ru -- addresses most routing * Set RAILS_RELATIVE_URL_ROOT to make asset helpers work * Fix Enki-specific URLs in post_path helper and admin view to work in a non-root-path deployment In config/application.rb, comment an example line that sets RAILS_RELATIVE_URL_ROOT. The line is commented so that the app still runs in "/", but a one-line config change or setting that environment variable would change that.