Comments (13)
This should be line 15... can you confirm?
<% if (tags = post.tags).any? %>
from refinerycms-blog.
Yes it is:
<% if (tags = post.tags).any? %>
<aside class='tagged'>
<%= t('tagged', :scope => 'blog.posts.show') %>
<%=raw tags.collect { |tag| link_to tag, tagged_posts_path(tag.id, tag.name.parameterize) }.to_sentence %>
</aside>
<% end %>
from refinerycms-blog.
I'll be honest I am pretty stumped by this. Anyone else?
from refinerycms-blog.
Oh wait, you said in bulgarian... I wonder if we need to transliterate? Can you fork and see if transliterating helps?
tagged_posts_path(tag.id, transliterate(tag.name).parameterize)
from refinerycms-blog.
OK, I've tried with transliterate, but with no success.
ActionController::RoutingError in Blog/posts#index
Showing refinerycms-blog-1.6.2/app/views/blog/shared/_post.html.erb where line #18 raised:
No route matches {:controller=>"blog/posts", :action=>"tagged", :tag_id=>1, :tag_name=>""}
Extracted source (around line #18):
15: <% if (tags = post.tags).any? %>
16: <aside class='tagged'>
17: <%= t('tagged', :scope => 'blog.posts.show') %>
18: <%=raw tags.collect { |tag| link_to tag, tagged_posts_path(tag.id, ActiveSupport::Inflector.transliterate(tag.name).parameterize) }.to_sentence %>
19: </aside>
20: <% end %>
21: </section>
I didn't see how transliterate will help?! Because it transforms sting in Cyrillic to series of '?'. And the when parameterize is called the result is an empty string.
from refinerycms-blog.
Can you try this in your Gemfile
gem 'refinerycms-blog', :git => '[email protected]:resolve/refinerycms-blog.git'
$ bundle update
and tell me if it's okay with Bulgarian tag names now? I made the parameter :tag_name optional in routes.rb
from refinerycms-blog.
Yes, now it's OK. Tag name is indeed optional (/blog/tagged/1?tag_name=). The posts are listed. Tags are shown in
. I can even filter posts by selected tag.from refinerycms-blog.
Would you consider this issue resolved?
from refinerycms-blog.
kinda sucks about that ?tag_name= part
from refinerycms-blog.
I don't like these "?tag_name=" neither. I'm not an expert in Refinery but why the tag_name should be passed if the tag_id has already been passed to the controller?
from refinerycms-blog.
Just for prettiness in the URL
I don't know off hand how to make empty params stay out of the URL but I'm
sure there is a way
I don't like these "?tag_name=" neither. I'm not an expert in Refinery but
why the tag_name should be passed if the tag_id has already been passed to
the controller?Reply to this email directly or view it on GitHub:
https://github.com/resolve/refinerycms-blog/issues/85#issuecomment-1475474
from refinerycms-blog.
Just for prettiness in the URL
I thought so. :)
I have a suggestion. The show action of categories is invoked with url /blog/categories/category_name. In my case the category_name is in Cyrillic and the posts in that category are listed. So if it's working for categories is it possible the same approach to be used for the tags too?
from refinerycms-blog.
I'm closing this and opening a new issue around the params
from refinerycms-blog.
Related Issues (20)
- Error when trying to upgrade HOT 1
- Friendly urls are not generated on save HOT 8
- 'refinery_settings' already exists HOT 2
- Compatibility with Rails 5.2 HOT 4
- Updating to jquery-ui v6 HOT 1
- Upgrading to version 4 resulted in list of authors to no longer be available from the Posts form
- Log production HOT 5
- Installation breaks base install of refinerycms HOT 8
- Bundle take too loog time to work. HOT 4
- refinerycms-wymeditor not work HOT 2
- Don't release the version >= 4.0.0
- Fix N + 1 for Refinery::Blog::Post.live HOT 5
- [Bug: feature/refinery-5] Can no visit the posts management page
- Travis CI fails with job exceeded max time limit HOT 1
- query-ui/widgets/autocomplete not found HOT 3
- Disable RSS Feed HOT 2
- Failing to install HOT 3
- uninitialized constant Refinery::Application (NameError)
- Dependabot can't resolve your Ruby dependency files
- is this gem still maintained?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from refinerycms-blog.