3
votes
0answers
219 views
stream partial views in Ruby on Rails 3.2+
I'm looking for a railsy way to stream partial views in Rails 3.2+. Right now streaming is supported only for yielding parts in layout from template via provide.
But say I have n posts on a blog ...
2
votes
0answers
57 views
Textarea resizes and triggers best_in_place blur event
I'm using the best_in_place gem on several textareas and sometimes (seemingly randomly) the textarea 'jumps' and triggers the blur event when I click save, prompting the "discard your changes" ...
2
votes
0answers
145 views
Images don't resolve correctly using Rails asset pipeline in development mode
TL;DR asset_data_uri works but asset_path does not.
I recently switched from a homegrown + jammit asset pipeline over to the Rails asset pipeline in hopes that I could ditch a bunch of code and have ...
2
votes
0answers
31 views
I18n strange behaviour
I am using I18n with Redis store, and have a strange behavior after updating to Rails 3.2.13
[6] pry(main)> I18n.t("my_website_field")
=> "M"
[7] pry(main)> $redis.get("en.my_website_field")
...
2
votes
0answers
117 views
How to create a 12 hour (with AM/PM) time select element?
I am using rails 3.2.13. I want to show 12 hours of clock and am/pm also in dropdown. Seems lot of people talking about this but there is no inbuilt solution for the same.
time_select("post", ...
2
votes
0answers
64 views
How to use update_elements with rails3-jquery-autocomplete?
I'm using rails3-jquery-autocomplete (Rails 3.2.10), and I think I may have two issues which may or may not be interacting.
I have a "name" field (containing a given name) in a table 'pi'. I want ...
2
votes
0answers
91 views
Rails 3.2.x double request in ajax and non-ajax forms
When I start my app in production environment all my forms make a double request to the server even if they don't have the :remote => true. Until know everything I have found about this matter is ...
2
votes
0answers
35 views
Trouble loading the JSON extended parser after Rails 3.1 -> 3.2 upgrade
I'm upgrading a Rails app from 3.1.10 to 3.2.11. I'm using version 1.7.6 of the json gem.
At the top of my app controller I had been requiring the library like this: require 'json/ext', enforcing the ...
2
votes
0answers
108 views
Rails 3: How to restrict access to the web interface for adding oauth authorized applications using Doorkeeper gem
I have a Rails Application Which uses Device + doorkeeper.I am also using cancan for Role Management.In my application i uses http://localhost:3000/oauth/applications/new for registering my ...
2
votes
0answers
98 views
Using the lib folder for application parts in rails
there are some problems with Ruby on Rails I couldn't solve even spending hours and hours trying. I hope you guys can help me. The four questions are marked with Q1-Q4 at beginning of line.
I have an ...
2
votes
0answers
121 views
Fixed - Rails model: saving works locally but not on Heroku
I have a Rails model for a Recipe.
It has an attribute, views, which counts how many times it has been viewed.
In the show action of my controller, I fetch the model object normally:
@recipe = ...
2
votes
0answers
285 views
In Rails 3, how to redirect straight from the routes while setting cookies
I've just come across a situation in the app I'm working in, in which I wrote an action specifically for setting the language cookie and redirect to the last url. Something like this:
def language
...
2
votes
0answers
102 views
nested_form reorder
I have a form with dynamic fields (has_many associated model) which can be added/removed with the help of nested_form gem (Thank you, Ryan Bates!).
Now, I'd like to give user a possibility to reorder ...
1
vote
0answers
31 views
Weird Behaviour with respond_to vs plain render with ajax success
I have a form with
data-remote="true"
Which works.
The controller code was(simplified):
render json: { "price" => "£3000" }, status: 200
I then changed it to:
respond_to do |format|
...
1
vote
0answers
20 views
Rails Deep Model Versioning with Approval
My model is related to other models via has_many relation, is there a known gem there or recommended approach which would make it easy to version each update? at least two levels deep?
I already ...