Migrate SHA1 Salted Hashes To Be Encrypted by Bcrypt | Fixed issues |
- Migrate SHA1 Salted Hashes To Be Encrypted by Bcrypt
- Passing multiple fields values to ransack
- Adding text on button click to simple form with jquery
- Morris.js how to create graph for specific type
- Refactoring (sorting) code with React and Rails
- Active admin / Carrierwave multiple image upload
- password_field_tag submits FILTERED value
- Rails: Paperclip 4 - Renaming a file during creation
- ActiveModelSerializer not kicking in
- How to find post URL in rails?
- How to truncate n tables with one single ActiveRecord connection
- Unable to define relationship within ActiveRecord
- Jammit isn't adding a timestamp to my javascript files in Rails 2.3. How can I fix this?
- client-service architecture: keep client in sync with in-memory data sctructure
- Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : org.postgresql.ds.PGConnectionPoolDataSource
- How do I use devise sign in/up in a different view as a partial
- How do I use Rails Selectize in my Rails Project?
- Rails 4 Error: NoMethodError - undefined method
- Rails and Active Admin Nested Resources
- Rails models : SQL OR AND keywords
- How to upload privatekey.pem to aws and use url as path in controller
- group by day based on a particular column with its unique entries - ROR
- Rails - No proper access to self join model
- How to set morris.js values from Rails controller
- Rails installation Error: dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
- if else if else in angular js
- How to test and deploy a Docker production image?
- Rspec forward and back slash
- bundle does not respect gemrc?
- Turbolink causing issue to load the 3rd party javascript(zendesk) on next page
Migrate SHA1 Salted Hashes To Be Encrypted by Bcrypt Posted: 18 Sep 2016 08:05 AM PDT I have an old application (built on .Net C#) includes Users table with hashed passwords
I think that the best approach (as I've read) is to let users log into my new app using their old passwords (and I don't know how to do it) and then encrypt their passwords (by BCrypt) and follow the same procedure of newly registered users' password encryption in Rails app. I appreciate all suggested solutions to solve this issue. |
Passing multiple fields values to ransack Posted: 18 Sep 2016 08:23 AM PDT I have Rails app with a table and I want to have search fields on top of each column which should perform search on the column and those searches should work together. So I'm looking for a way to implement it and stumbled upon Ransack gem which looks nice with all it's selecting and sorting functionality but I can't understand if I can use it to solve my problem. From the documentation I see that I can pass a parameter to it like this But I think it's not enough for my problem and I need something like Can I do something like this with Ransack? Or how else can I solve my problem with it or maybe I should use something else? |
Adding text on button click to simple form with jquery Posted: 18 Sep 2016 07:37 AM PDT I'm starting out with jQuery, and I'm trying to add bootstrap buttons that add Spanish-accent vowels to the simple_form text field on click. I'm modeled the code after an answer to this question, but nothing is currently happening upon clicking the button--am I doing something wrong? In the view, I'm using simple form and adding a wrapper id to the text field: In application.js I have: |
Morris.js how to create graph for specific type Posted: 18 Sep 2016 07:57 AM PDT I have some troubles with create graph using Morris.js library. I created sport app and every training has some values. One of them is "workout" it means type of workout("Running","Swimming","Cycling"). I want to display line graph with date and distance, but for specific type of training, for example "Running". I created general graph with all dates and distances, but when I try to make graph for specific type it doesn't display proper one, but graph with sum of all running distances for every day(horizontal line). I don't know how to fix line in workouts_helper.rb distance: Workout.where(workout: "Running").sum(:distance) workouts_helper.rb : application.html.erb : index.html.erb : |
Refactoring (sorting) code with React and Rails Posted: 18 Sep 2016 07:25 AM PDT I'm working on a React-Rails app in ES6, and I'm trying to figure out the best way to refactor my code. For example, within one of my main React components, I have a couple of methods that manage merge-sorting my results. Where should that sorting code live? I'm trying to figure out the best practices with React and Rails to keep my code as DRY and SRP-mindful as possible. |
Active admin / Carrierwave multiple image upload Posted: 18 Sep 2016 07:55 AM PDT I've been struggling for a week now, I'm trying to create a form inside active_admin where a user can select several pictures, add a description and a title, then submitting his form to create something that would look like a gallery So far, I have two models created with the commands: Here are how look my models now: gallery.rb image.rb admin/gallery.rb My problem is that even though my 'image' form shows up, I can't manage to save the images through the other model, nothing gets uploaded inside my 'public/upload' directory, and nothing gets written inside my database. I can't find anything interesting internet that could solve this problem Feel free to ask for another file Any help welcome |
password_field_tag submits FILTERED value Posted: 18 Sep 2016 07:57 AM PDT I am new to rails and I am making a simple login page. this is the code of my view but when I check the parameters submitted the result is I can't compare the two password, even if I tried to display it to the console using puts params[:instructor][:password] it shows nothing |
Rails: Paperclip 4 - Renaming a file during creation Posted: 18 Sep 2016 06:43 AM PDT I have a Rails application with Paperclip 4 where there are products with images. Now, I want after an image is uploaded to rename the image to the product name. e.g. Product: The number at the end should be equal to the amount of images which the product possesses. I tried interpolators but they don't really work for my case since I want the first image to be called So what I need is some logic which renames the image so a user can upload an image with whatever name he wants and it will be renamed correctly. Does somebody have an idea how it works? Probably something with callbacks I guess. Thanks Edit: My image model logic so far: |
ActiveModelSerializer not kicking in Posted: 18 Sep 2016 07:09 AM PDT I want to serialize the newly created resource in this action : But I am creating the new resource via ajax : What am I missing here? |
How to find post URL in rails? Posted: 18 Sep 2016 06:43 AM PDT I'm trying to display the URL in rails but it returns an error What method can I use? |
How to truncate n tables with one single ActiveRecord connection Posted: 18 Sep 2016 05:47 AM PDT I want to create a rake task in order to delete all records from a certain If I need to truncate more than one table, say tables and so avoid to establish multiple ActiveRecord connections like the example below? |
Unable to define relationship within ActiveRecord Posted: 18 Sep 2016 05:38 AM PDT I am trying to create an association between my attribute_set and attribute tables. Though ActiveRecord keeps displaying this error. |
Jammit isn't adding a timestamp to my javascript files in Rails 2.3. How can I fix this? Posted: 18 Sep 2016 05:06 AM PDT Since jammit 0.4.4 : In my app, jammit doesn't add a timestamp in production mode, which makes it a fustrating to update the javascript in my app. This is my config : This is how I use it : and this is what it generates ; Anyone any idea how I can fix my problem and add the timestamps? Thanks! |
client-service architecture: keep client in sync with in-memory data sctructure Posted: 18 Sep 2016 04:47 AM PDT I have a service that updates a set in redis (fast in-memory data storage) in the real time. I also have a rails app that is connected to this redis instance. The task is to display the set contents to all the clients. Please note that according to some client's settings, some elements of the set are not supposed to be sent to them. I don't want to send the whole set contents on every update. It should be possible to only send diff, and I'm choosing which approach to use. implementation of rails -> client connection:
service -> redis set -> rails:
On top of that, I'll also have to implement change/delete cases. It seems like this approach is way too complex and low-level. Things can easily get out of sync, and they are duplicated in memory several times.
Additional info: there will not be too many clients, maybe a thousand. The set will be updated once per second, sometimes more, sometimes less. What will be the best approach to keep clients in sync with the state in redis? Is react usage justified? Is there some native react implementation of such "diff" pattern? |
Posted: 18 Sep 2016 04:17 AM PDT i am trying to connect my jruby on rails application with database using JNDI connection but i am getting error as Just for information my glassfish version is 4 what could be the reason for this?? Thanks, |
How do I use devise sign in/up in a different view as a partial Posted: 18 Sep 2016 04:30 AM PDT I have my landing page which should contain and login form and a sign up form. I have two buttons of course once the user clicks on one of them it will render the appropriate form. I saw something like that on railscast. |
How do I use Rails Selectize in my Rails Project? Posted: 18 Sep 2016 08:04 AM PDT I'm getting the error application.js: |
Rails 4 Error: NoMethodError - undefined method Posted: 18 Sep 2016 05:43 AM PDT I am struggling ordering my loop through my Devise Users by the upvotes on Inside of that loop I get the value I would like to use to order the elments with: That's my loop: And my controller: Without I am grateful for each help! |
Rails and Active Admin Nested Resources Posted: 18 Sep 2016 03:56 AM PDT I build a simple ecommerce app and i am using active admin for administration panel. My problem is this. i have two models orders & order_items. order_items saves the orders products. The association is order -> has_many order_items & order_items -> belongs_to orders. I have this code in active admin but i can't see the items of an order(blank). I can reach order_items throw console so there is no problem with the model associations. |
Rails models : SQL OR AND keywords Posted: 18 Sep 2016 08:08 AM PDT I use rails and I want a request likes that: I write something likes that: But when I do that, I have this request: How can I have parentheses? |
How to upload privatekey.pem to aws and use url as path in controller Posted: 18 Sep 2016 02:51 AM PDT Maybe this is possible or not. So far I have two ways: 1: Upload to AWS (encrypted) 2: Upload to local server The API I use requires the user to use their
In short pieces: React for upload: Paperclip initializer: Model: Controller: If the file was at the root of the server then all is well. Would it be best to have the user upload the file to my server instead? Can I upload |
group by day based on a particular column with its unique entries - ROR Posted: 18 Sep 2016 04:40 AM PDT I have two tables Now, there are many entries for the same I am able to group the unique entries by day but the challenge comes when some entries which was imported yesterday are being imported today also by some other user, in that case same entries are being counted for yesterday and today when i group it by day. So, what I'm trying to do is
So that I will have only unique entries count on grouping by each day. But with this also I'm not having any luck. Below are the images of my two tables: First image is for 'ImportedContactUser' table Second one is for 'ImportedContact' table Current code for retrieving the data: |
Rails - No proper access to self join model Posted: 18 Sep 2016 08:12 AM PDT I have model called Section, and I want section to be able to have many Sections - so a Self Joins seems like a place to start. I setup my code like this: Model file Migration file As you can see I set When I print Trying to retrieve child_sections gets me an error: Where did I make my mistake? |
How to set morris.js values from Rails controller Posted: 18 Sep 2016 08:11 AM PDT I struggle with adding circle graph in my sport app. Is it possible to set morris.js value to variable from my controller? I have @diet_calories variable in controller and I want to display Carbs -> Protein -> Fat in 60% -> 20% -> 20% relation. If I set value of carbs in script tag (value: @diet_calories * 0.6) it dosn't work. Do you have some suggestions to fix that? application.html.erb : info_controller.rb : diet.html.erb : |
Rails installation Error: dyld: lazy symbol binding failed: Symbol not found: _clock_gettime Posted: 18 Sep 2016 02:13 AM PDT i am trying to "rvm install 2.3.0" and coming up with the following error: I've been stuck on this for a while and really not getting anywhere... |
Posted: 18 Sep 2016 03:33 AM PDT I have to incorporate angular in my slim file, I'm not sure how to transform if else block in angular. I know angular don't have ng if else statements but is there a way to change below code to angular I want to achieve some thing like this |
How to test and deploy a Docker production image? Posted: 18 Sep 2016 02:39 AM PDT I'm developing on Ruby on Rails and start using Docker for deployment for a month. The following are the steps I'm working on.
With this workflow, I will have a single image that have all testing, development and production gems. The workflow that I find from talking with many people
With this method, I think it's violating the purpose of Docker (the image that being test should be indifference from the one that will be deploy). How to specify and implement an approach that test and push a production image? |
Posted: 18 Sep 2016 01:57 AM PDT I saw this line of code in betterspecs. What does the slashes before 'it' and after 'Belville' mean? |
bundle does not respect gemrc? Posted: 18 Sep 2016 01:32 AM PDT I've configured gem source with gem command, now gem rc is like However when I run How can I change it to http scheme too? P.S https is slow in my local network, so I need to use http connection instead. |
Turbolink causing issue to load the 3rd party javascript(zendesk) on next page Posted: 18 Sep 2016 01:43 AM PDT I am on rails3, and Turbo-links causes the link for zendesk to not work. I was using zendesk script and that was not loading on next page and then I have used script that mentioned here. It seems working fine on chrome, but on Firefox and Safari, its still causing problem. I have included below lines into my layout: I have searched around web and found some solutions but not working at all: Any anyone has any idea then please let me know. |
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