Everyone to be radio_button on a new line table | Fixed issues |
- Everyone to be radio_button on a new line table
- Ruby on Rails: Use Engine's Variables / Models Outside of Mounted Area
- Rails ActiveModelSerialzer include with transform_key
- What is standard practise for grouping batches of records added to MySQL db in Rails?
- Tutorial for Android Login with Rails API and Devise without Token Authentication
- rake aborted! NoMethodError: undefined method `add_filter' for AutoHtml:Module
- Rails tests for "(in)valid log-in" - explanation needed
- Ruby on Rails Scope with params and SQL in Rails 4
- Why use hstore extension over ActiveRecords serialization?
- OAuth2::Error: Invalid grant with Doorkeeper
- wrong redirection in Rails
- Faye Websocket: can't detect websocket connection?
- Active Scaffold 3.4.37 render active scaffold issue with Rails 4.2.6 and Ruby 2.3.0
- How to pick minus except of two tables in Ruby on Rails?
- getting error#17 from highcharts while using solid gauge from backbone rails
- How to refresh view when a new model instance was created in background
- rspec and gem bullet test env fail
- Rails creating wall with microposts in facebook style
- refactoring methods in rails4
- Need to create PDF using edit blob data in Rails
- angular rails app not working after putting controller to seperate file
- Unable to pass array in curl using ruby %x command
- Rails set new dimentions image paperclip
- Stub specific instances of a class in a functional test
- Dynamic population of drop-down list Rails
- Build expression builder which will build expression and then through query filter tables at run time in rails
- how to match fingerprint in rails?
- Rails: how to get the corresponding label attribute "for" with radio_button_tag
- Implement code executor in rails app like rails console
- Rails File_field Maximum stack size
Everyone to be radio_button on a new line table Posted: 19 May 2016 06:59 AM PDT How do everyone to be radio_button on a new line table? |
Ruby on Rails: Use Engine's Variables / Models Outside of Mounted Area Posted: 19 May 2016 06:52 AM PDT So I'm using Ruby on Rails for my application, I'm using Thredded for the community aspect and Devise for the authentication aspect. Although I believe this issue isn't specific to any of the actual Gems and more a general Ruby on Rails question. To mount the Thredded Gem, I put this code in my route.rb file: This makes the Thredded gem work perfectly from /community/. I want to use the Thredded navigation across the entire site. However, I can only access things like Thredded.current_user or other specific Thredded variables within the /community/ section of the site. Is there any way to mount the Thredded::Engine within /community/ but also have aspects of it avaliable outside of that scope? Here is the Thredded Gem: https://github.com/thredded/thredded Here is the Thredded navigation: Here are the shared files the nav is rendering: https://github.com/thredded/thredded/tree/master/app/views/thredded/shared Here is the Thredded Initializer file: |
Rails ActiveModelSerialzer include with transform_key Posted: 19 May 2016 06:51 AM PDT I have ZoneSerializer And I set When I get response from server I get |
What is standard practise for grouping batches of records added to MySQL db in Rails? Posted: 19 May 2016 06:50 AM PDT The front-page of another website is being scraped hourly for post Currently there is only one table in the application (that is doing the scraping) related to storing this data which looks like, There are 30+ records to be added on each scrape, and currently the only way to sort them after the fact is by But it doesn't seem right.
What is the more proper way to deal with organization in this situation? |
Tutorial for Android Login with Rails API and Devise without Token Authentication Posted: 19 May 2016 06:50 AM PDT I am following https://www.youtube.com/watch?v=QxffHgiJ64M&list=PLe60o7ed8E-TztoF2K3y4VdDgT6APZ0ka&index=1 to create a simple android login and registration function, i am using rails and devise without the token authentication for the server side. is there any tutorial for creating the rails part for the server (session and registration controller) ? |
rake aborted! NoMethodError: undefined method `add_filter' for AutoHtml:Module Posted: 19 May 2016 06:47 AM PDT Getting this error while running rake db:migrate command on Rails 4. Working on a project developed by other company.Here is my code from catarse_auto_html.rb `module Shared::CatarseAutoHtml extend ActiveSupport::Concern included do AutoHtml.add_filter(:email_image).with(width: 200) do |text, options| text.gsub(/http(s)?://.+.(jpg|jpeg|bmp|gif|png)(\?\S+)?/i) do |match| width = options[:width] %|| end end end end ` |
Rails tests for "(in)valid log-in" - explanation needed Posted: 19 May 2016 06:37 AM PDT I understand part of the code here (from Hartl's tutorial), however I'm confused about the following:
Code here (Hartl tutorial book Ch. 8) |
Ruby on Rails Scope with params and SQL in Rails 4 Posted: 19 May 2016 06:55 AM PDT Can someone please tell me what is wrong in this statement? end NetBeans put a red line under it and says Unexpected tLPAREN_ARG Thank you. |
Why use hstore extension over ActiveRecords serialization? Posted: 19 May 2016 06:30 AM PDT Rails introduced Postgres hstore support in Rails 4. But before that one could use Active Model Serialization like so: I'm a layman and wonder, what are the benefits to one over the other? |
OAuth2::Error: Invalid grant with Doorkeeper Posted: 19 May 2016 06:27 AM PDT I'm building an API inside vagrant box using rails 5 api. I already manage to build an api in my local ( without vagrant box ). I'm just confused my I'm always getting this which is I know that this I have new generate app id and secret. by the way box configure like this: And I run It has been 2 days that I'm trying to fix but no luck at all. |
Posted: 19 May 2016 06:27 AM PDT I'm experiencing a really weird behavior in my Rails app. I have a nested resource Sensor and in its controller I have an action to import records from a csv file. The end of that action is: The problem is that the redirection goes to a wrong action 'location' in the same controller. With no output in the console showing a change in the redirection. I don't have any before_filters in that controller and my routes.rb looks like: routes.rb Extras: This weird behavior happens no matter what path is in the redirect_to. If I change the action name from 'location' to anything else everything works just fine. Writing deployment_sensors_path directly in the browser address bar works perfectly. I'm using Rails 4. Question: It seems location is a reserved word for a render option to set the HTTP header. Could that be the problem? If not, What else can I do to debug this problem? |
Faye Websocket: can't detect websocket connection? Posted: 19 May 2016 06:12 AM PDT https://devcenter.heroku.com/articles/ruby-websockets - tutorial this code is basically based on. My rack middleware in Note the logging I added: basically, when I echo my server with websocket connection ( P.S. I inserted Messenger middleware in the top of Rack stack. |
Active Scaffold 3.4.37 render active scaffold issue with Rails 4.2.6 and Ruby 2.3.0 Posted: 19 May 2016 06:03 AM PDT If I render active scaffold in a partial i.e render :active_scaffold => "ledger_accounts" I am getting the following error. ActionView::Template::Error (No route matches {"action"=>"new", "controller"=>"ledger_accounts", "eid"=>"77d8f5b1eaefaab20858811ed44ce6b3"} missing required keys: [:controller]): 1: <% action_links = active_scaffold_config.action_links.collection 2: unless action_links.empty? -%> 3: 4: <%= display_action_links(action_links, nil, :skip_unauthorized => true) %> 5: <%= loading_indicator_tag(:action => :table) %> 6: 7: <% end %> app/views/ledger_accounts/ledger_accounts_index.html.erb:32:in `_app_views_ledger_accounts_ledger_accounts_index_html_erb__4071978264884595668_51420140' In My route.rb file I have defined the route like i.e resources :ledger_accounts do as_routes collection do end Please suggest me what to do? |
How to pick minus except of two tables in Ruby on Rails? Posted: 19 May 2016 06:26 AM PDT I have two tables one of which include ids from the other one. How can I choose all the records from the first table that`s ids are not in the second table using RoR query interface? |
getting error#17 from highcharts while using solid gauge from backbone rails Posted: 19 May 2016 05:46 AM PDT I am trying to use "solidgauge" chart from highcharts in backboneJS. Previously I had used a VU meter and it was working correctly. When I used solid gauge I am getting highcharts#17 error. As per this error either I am giving series.type or chart.type wrong else I don't have the necessary extension files. I have loaded the "highcharts.js", "highcharts-more.js", "highcharts-3d.js" and "exporting.js" files and the sibling VU meter worked.So i think there is something wrong with my chart options but can't seem to figure out what that is.Here is my chart configuration and I am giving the data for the series dynamically.I am using coffeescript. I cant seem to figure out whether the fault is because of the chart configuration or any missing header file. Can anyone please help? |
How to refresh view when a new model instance was created in background Posted: 19 May 2016 05:58 AM PDT Similar to the example in this blog post I want to set up my app. With the difference, that I want my view to refresh, when an object was created in one of my databases tables, not when a filesystem event happened. Is there a gem similar to rb-fsevents, but watching a database/table ? How can I detect database changes in Rails without polling? My view: The controller/action: |
rspec and gem bullet test env fail Posted: 19 May 2016 05:44 AM PDT i want to run Gemfile config/environments/test.rb spec/spec_helper.rb but when i try to run Please help me solve this problem |
Rails creating wall with microposts in facebook style Posted: 19 May 2016 05:48 AM PDT I have created some models: User:
Activity:
Post:
Follower:
My models: Now I want to archive something like facebook's wall with posts. More specific, on homepage should display posts connected with last activities users who logged in user follow. But not every. I want to get posts wrote by myself, shared by myself and posts created, liked and shared by users who I follow. Without duplications, so if user1 creates post and user2 likes it, user1 should see his own post only one with annotations that user2 likes his post. But there are duplicates and I have to add my own posts. I also want to paginate results. What is the best way to do it? |
Posted: 19 May 2016 05:45 AM PDT I have notifications as polymorphic and comments also as polymorphic. So you can get notifications when somebody comments on your notifiables (product, post, product_customer, product_lead). There are also other types of notifications that are not relevant here. So the flow:
OVERVIEW: notification gets created like this: THINGS TO BE REFACTORED: Problem: I have problems with points 4 and 5 from the flow. To trigger checking the notification and decrease the notification number I inserted a custom action when user clicks on the link. This action then redirects him to the desired page. At the moment the commentable object of the comment can belong to 4 types of classes (post, product, product_customer, product_lead) and some of them requires parent_id. Thanks to this it became a little messy and I have no idea how to clean this up. My questions:
link in views _commented.html.erb _commented.js.jbuilder notifications controller / custom action application controller |
Need to create PDF using edit blob data in Rails Posted: 19 May 2016 05:33 AM PDT I am developing Now i can download it using Now i tried to |
angular rails app not working after putting controller to seperate file Posted: 19 May 2016 05:49 AM PDT I have a rails app which uses angular in front end. I have put all angular files in app/assets/javascripts/angular. I have one template folder which has all the views and app.js angular/app.js This works.. But when I try to move the controller into a different file it wont work and not showing any errors. Here is what I tried for moving it to different file angular/app.js Created below file in angular/controllers/homeCtrl.js angular/controllers/home-ctrl.js Below are the Here is the full application.js Could someone tell me what am doing wrong here?? |
Unable to pass array in curl using ruby %x command Posted: 19 May 2016 05:34 AM PDT Hi I am passing an array of ids in curl command in ruby application via %x(), but I am unable to add those throwing error as : Array : Command used : Showing json parse error , can you help me out from this ? Thanx in advance. |
Rails set new dimentions image paperclip Posted: 19 May 2016 05:23 AM PDT Is there any way to set new dimensions to I have so i want to set new geometry and save it Of course i have my My main goal set new dimensions during cropping photo with so when i receive new params like |
Stub specific instances of a class in a functional test Posted: 19 May 2016 05:30 AM PDT I want to test that a specific icon gets displayed in the view for a User with a streak more than X no of days. So I need to stub a The return value is an array, the first value in the array is the no of days in the streak and the second value is the no of posts in that streak. The line |
Dynamic population of drop-down list Rails Posted: 19 May 2016 06:57 AM PDT I am trying to make 2 partials. The first partial will be a dropdown list that shows only the objects(ManagerApprovals) associated with the current user, that list would be populated by the associated ManagerApprovals that have a boolean marked as true. The 2nd partial, depending on the item chosen from the dropdown, a 2nd partial will be populated with an index of items associated with the chosen ManagerApproval. My question is about the first partial. I am struggling to create the drop down list and could use some help. I cannot figure out the syntax for my form. Currently I have a controller like so. manager_approval_controller.rb My view is like this but is not correct I want a dropdown menu but I need it to populate based on the ManagerApproval being associated with the current admin and each ManagerApproval object having a boolean set to true. Any help would be greatly appreciated |
Posted: 19 May 2016 04:49 AM PDT I want to filter out the data at run time , user can add how many conditions want to add on some specific fields in table and then after applying all user that meet with given expression will filter out. Similar type of filter is done in jira and redmine software. I dont want to make whole thing from scratch , is any type of gem available. I used ran sack but it has its limitation. |
how to match fingerprint in rails? Posted: 19 May 2016 04:18 AM PDT I want to match fingerprint from database in rails, please any one will tell me how to store value of fingerprint in db and how to match it when user scan his fingerprint with existing value of his fingerprint with 90% of matching probability. |
Rails: how to get the corresponding label attribute "for" with radio_button_tag Posted: 19 May 2016 04:33 AM PDT I want make the label text clickable, so that the corresponding radio button is set selected. For that i need to set a for attribute in the label with the id from radio button. the generated output: The output i want is: How can i get the id="size_id_8" from radio button to the label for="size_id_8" ? |
Implement code executor in rails app like rails console Posted: 19 May 2016 04:12 AM PDT Any suggestion how to achieve this, I know its not correct to expose app environment. For small tasks connecting to and opening rails console from remote systems is time consuming. Instead if we can have small front end to do tasks same like rails console. Provide suggestions without considering authentication, security and etc. |
Rails File_field Maximum stack size Posted: 19 May 2016 04:08 AM PDT I'm trying to upload a photo by clicking a div following this tutorial: https://jsfiddle.net/rustybailey/2b7dD/ However when i click the div i get this error I know it's a loop error. However I don't understand why. Here's my code: Html Css Js |
You are subscribed to email updates from Newest questions tagged ruby-on-rails - Stack Overflow. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment