[Rails] help me correct this wrongly syntaxed form_with block

2020-03-11 Thread fugee ohu
The problem I was having is params press_release was missing This is an attempt at adding it that draws a sytax error <%= form_with model: @press_release, url: create_user_tour_press_release_path(press_release: { tour_id: @tour.id, artist_id: @artist.id, poster_type: 'User' }) do |f| %> -- Y

[Rails] help me perform my first searchkick search

2020-02-04 Thread fugee ohu
So far, I don't get any results returned user.rb: searchkick word_middle: ['full_name', 'description', 'interests'] def full_name [first_name, last_name].join(' ') end def search_data { full_name: full_name, description: description, interests: interests } end world_c

Re: [Rails] help on building a microservice that can receive an uploaded image

2019-10-07 Thread bouazza Mohamed
Thanks man , your comment providing was helpful, thank you again On Mon, Oct 7, 2019 at 12:51 Walter Lee Davis wrote: > You were honest about this being your "homework", which is good: many > people try to ask the same sort of questions without that decency. I gave > you a link to the documentat

Re: [Rails] help on building a microservice that can receive an uploaded image

2019-10-07 Thread Walter Lee Davis
You were honest about this being your "homework", which is good: many people try to ask the same sort of questions without that decency. I gave you a link to the documentation, which has examples for each of the methods in this module -- without seeing the rest of your work, I can't tell you mor

Re: [Rails] help on building a microservice that can receive an uploaded image

2019-10-06 Thread bouazza Mohamed
Do you have some examples for using this , I found cloudinary gem , they already did some good work on image management pipeline. On Sun, Oct 6, 2019 at 12:41 Walter Lee Davis wrote: > Ruby has SecureRandom for this sort of thing: > https://docs.ruby-lang.org/en/2.4.0/SecureRandom.html > > Walt

Re: [Rails] help on building a microservice that can receive an uploaded image

2019-10-06 Thread Walter Lee Davis
Ruby has SecureRandom for this sort of thing: https://docs.ruby-lang.org/en/2.4.0/SecureRandom.html Walter > On Oct 6, 2019, at 5:08 AM, bouazza Mohamed wrote: > > Hi everyone , > I have a job interview test to build a simple microservice that can receive > an uploaded image and return a un

[Rails] help on building a microservice that can receive an uploaded image

2019-10-06 Thread bouazza Mohamed
Hi everyone , I have a job interview test to build a simple microservice that can receive an uploaded image and return a unique identifier for the uploaded image that can be used subsequently to retrieve the image. Do you have some ideas on lib and UUID that can be used . normaly in PHP there

Re: [Rails] help...how do i get the "projects_path" from controller?

2019-05-21 Thread Ariel Juodziukynas
where are you calling that link_to helper? on a view? on a helper? sounds like you are not on the right context to properly use url_for helper (that's why it complains that you have to require routes or provide your implementation for it) El mar., 21 may. 2019 a las 16:15, tom () escribió: > Star

Re: [Rails] help...how do i get the "projects_path" from controller?

2019-05-21 Thread tom
Started GET "/pm/projects" for 10.0.1.10 at 2019-05-21 15:12:09 -0400 Cannot render console from 10.0.1.10! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255 Processing by ProjectsController#index as HTML User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER B

Re: [Rails] help...how do i get the "projects_path" from controller?

2019-05-21 Thread tom
thanks to all, BUT: <%= link_to "X", project_path(rec.id) %> --> harcoding works <%= link_to "X", url_for([rec, rec.id ]) %> --> arguments passed to url_for can't be handled. Please require routes or provide your own implementation <%= link_to "X2", :url => url_for(action: 'show', controll

Re: [Rails] help...how do i get the "projects_path" from controller?

2019-05-21 Thread Walter Lee Davis
Oh, duh. I didn't read what you were asking. Please ignore my answer. Ariel has the right answer here. Walter > On May 21, 2019, at 3:06 PM, Ariel Juodziukynas wrote: > > You can pass the object to the link_to if you want to use the show url: > > link_to 'Show', record > > Rails will infere

Re: [Rails] help...how do i get the "projects_path" from controller?

2019-05-21 Thread Ariel Juodziukynas
You can pass the object to the link_to if you want to use the show url: link_to 'Show', record Rails will infere the show action with the proper controller and id from the object's class El mar., 21 may. 2019 a las 16:03, Walter Lee Davis () escribió: > You could use > > link_to 'Index', url_fo

Re: [Rails] help...how do i get the "projects_path" from controller?

2019-05-21 Thread Walter Lee Davis
You could use link_to 'Index', url_for(controller: controller_name, action: :index) instead. That would be agnostic of whichever controller was rendering that _index.html.erb partial. Walter > On May 21, 2019, at 2:59 PM, tom wrote: > > yes i do: > scope :pm do > get '/', :to => 'pro

Re: [Rails] help...how do i get the "projects_path" from controller?

2019-05-21 Thread tom
yes i do: scope :pm do get '/', :to => 'projects#dashboard', :as=>'pm_dashboard' resources :project_resource_groups #, :path=>'tasks' resources :project_programs resources :projects end but again, the _index view partial is used in a lot index actions, so i dont know how to "p

Re: [Rails] help...how do i get the "projects_path" from controller?

2019-05-21 Thread Walter Lee Davis
The projects path isn't coming from the controller, it's coming from the routes file. Do you have any references in your routes.rb file that mention projects? Walter > On May 21, 2019, at 2:46 PM, tom wrote: > > hi, i have a generic _index partial, but i am struggling with constrcuting > the

[Rails] help...how do i get the "projects_path" from controller?

2019-05-21 Thread tom
hi, i have a generic _index partial, but i am struggling with constrcuting the (link_to "show", ..(rec.id)) how can i get that filled in? i have tried via url_for (controller & action), but it always says: arguments passed to url_for can't be handled please help thx -- You received this

[Rails] help with multiple domains into one app

2019-01-10 Thread tom
hi,, i have 2 domains setup and i am having issues. 2 domains, layout is being picked in applciaiton controller. 1st load after deploy shows correct site, but subsequent reloads just show same site under both domains. here the routes: class Subdomain1 def self.matches?(request) request.dom

[Rails] help with multiple production evvironmnets & devise config

2018-12-07 Thread tom
hi, i have 2 (A&B) production env files, set/loaded by passenger. here an excerpt from A: config.active_record.dump_schema_after_migration = false config.app_domain = 'fooo.com' config.action_mailer.default_url_options = { host: 'https://www.fooo.com' } config.action_mailer.asset_

[Rails] Help regarding a problem

2018-05-13 Thread Geetha Reddy
Hi All, I have the following problem. can you help me in solving this. Suppose we could access yesterday's stock prices as an array where: - The indices are the time in minutes past trade opening time, which was 9:30 am local time - The values are the price in dollars of Apple stock at th

Re: [Rails] help me debug this model

2018-03-27 Thread fugee ohu
On Tuesday, March 27, 2018 at 2:12:27 PM UTC-4, Walter Lee Davis wrote: > > Read the docs I linked you to, and if that doesn't explain it, then ask > the author of the code you're extending. It's possible that it is passing a > reference to a proc or lambda, but I have not seen that exact code

Re: [Rails] help me debug this model

2018-03-27 Thread Walter Lee Davis
Read the docs I linked you to, and if that doesn't explain it, then ask the author of the code you're extending. It's possible that it is passing a reference to a proc or lambda, but I have not seen that exact code before, so I can only guess. Walter > On Mar 27, 2018, at 2:04 PM, fugee ohu w

Re: [Rails] help me debug this model

2018-03-27 Thread fugee ohu
On Tuesday, March 27, 2018 at 11:44:54 AM UTC-4, Walter Lee Davis wrote: > > > > On Mar 27, 2018, at 9:20 AM, fugee ohu > > wrote: > > > > Actually the first thing is see when I visit that link is the use of > validate without the s > > The validate method is used along with a custom validat

Re: [Rails] help me debug this model

2018-03-27 Thread Walter Lee Davis
> On Mar 27, 2018, at 9:20 AM, fugee ohu wrote: > > Actually the first thing is see when I visit that link is the use of validate > without the s The validate method is used along with a custom validator method. The validates method is "built in" and uses a DSL to specify how you want the val

Re: [Rails] help me debug this model

2018-03-27 Thread Mugurel Chirica
What have you tried so far in debugging this? Have you used any debugger like pry to see what happens when you rune the code? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from i

[Rails] help me debug this model

2018-03-26 Thread fugee ohu
This model has some errors that I wasn't able to get sorted out the two lines that begin with validate should be validates but after that I don't understand what the author's trying to do If I change them to validates I get the error Unknown validator: 'MessageValidator' for validate :auction

Re: [Rails] help: ActionController::UnknownFormat in FooController#index

2018-03-05 Thread tom
you are correct. the space and or the period was the problem here. ill try out different solutions now thx all! On Mon, Mar 5, 2018 at 2:15 PM, Rob Biedenharn wrote: > > > On 2018-Mar-5, at 13:15 , Hassan Schroeder > wrote: > > On Mon, Mar 5, 2018 at 9:59 AM, tom wrote: > > so how can i pas

Re: [Rails] help: ActionController::UnknownFormat in FooController#index

2018-03-05 Thread Rob Biedenharn
> On 2018-Mar-5, at 13:15 , Hassan Schroeder wrote: > > On Mon, Mar 5, 2018 at 9:59 AM, tom wrote: >> so how can i pass this along? why is it not assuming html? > > Because computers don't make assumptions? 😀 > > Why are you telling it to respond differently depending on the format > and th

Re: [Rails] help: ActionController::UnknownFormat in FooController#index

2018-03-05 Thread Hassan Schroeder
On Mon, Mar 5, 2018 at 10:27 AM, tom wrote: > > , :defaults => { :format => 'html' } > fixed it Awesome! -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan Consulting Availability : Silicon Valley or remote -- You received this message because you are sub

Re: [Rails] help: ActionController::UnknownFormat in FooController#index

2018-03-05 Thread tom
, :defaults => { :format => 'html' } fixed it thank you On Mon, Mar 5, 2018 at 1:15 PM, Hassan Schroeder wrote: > On Mon, Mar 5, 2018 at 9:59 AM, tom wrote: > > so how can i pass this along? why is it not assuming html? > > Because computers don't make assumptions? 😀 > > Why are you telling i

Re: [Rails] help: ActionController::UnknownFormat in FooController#index

2018-03-05 Thread Hassan Schroeder
On Mon, Mar 5, 2018 at 9:59 AM, tom wrote: > so how can i pass this along? why is it not assuming html? Because computers don't make assumptions? 😀 Why are you telling it to respond differently depending on the format and then *not providing a format*?? -- Hassan Schroeder ---

Re: [Rails] help: ActionController::UnknownFormat in FooController#index

2018-03-05 Thread tom
so how can i pass this along? why is it not assuming html? On Mon, Mar 5, 2018 at 12:53 PM, Hassan Schroeder < hassan.schroe...@gmail.com> wrote: > On Mon, Mar 5, 2018 at 9:33 AM, tom wrote: > > getting 406 due to rails giving me ActionController::UnknownFormat > > and i dont know why. > > Mayb

Re: [Rails] help: ActionController::UnknownFormat in FooController#index

2018-03-05 Thread Hassan Schroeder
On Mon, Mar 5, 2018 at 9:33 AM, tom wrote: > getting 406 due to rails giving me ActionController::UnknownFormat > and i dont know why. Maybe because GET "/whatever/in/St.%20Peters" provides no information about the requested response format? > same routes(pattern) in a different controller work

Re: [Rails] help: ActionController::UnknownFormat in FooController#index

2018-03-05 Thread tom
getting 406 due to rails giving me ActionController::UnknownFormat and i dont know why. same routes(pattern) in a different controller work just fine. only difference is that the other one only does render, not repsond_to On Mon, Mar 5, 2018 at 12:29 PM, Hassan Schroeder < hassan.schroe...@gmail

Re: [Rails] help: ActionController::UnknownFormat in FooController#index

2018-03-05 Thread Hassan Schroeder
On Mon, Mar 5, 2018 at 9:13 AM, tom wrote: > i have a couple of 'seo' routes, which are not responding well What does that mean? ( http://www.catb.org/esr/faqs/smart-questions.html ) -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan Consulting Availabili

[Rails] help: ActionController::UnknownFormat in FooController#index

2018-03-05 Thread tom
HI, i have a couple of 'seo' routes, which are not responding well eg: match 'whatever/in/:seoterm' , as: 'seo_whatever _in' , :to => 'foos#index', via: [:get] , :mode=>{:x=>' whatever ',:y=>1} respond_to do |format| format.html { } format.js { } format.json {

[Rails] help with ransack / mysql performance

2017-10-12 Thread tom
hi, i am using ransack and i am experiencing slow queries, eg on the search sites i have a query like that: SELECT DISTINCT COUNT(DISTINCT `tablename`.`id`) FROM `tablename` WHERE (`tablename`.`city` LIKE '%Tampa%'); ~5sec w/o distinct ~ 6sec w/o distinct & w/o where ~4 sec what do you guys

[Rails] Help with gestalt of Pundit's authorize, please

2017-07-17 Thread Ralph Shnelvar
The best explanation I have found for the gestalt of Pundit is https://www.varvet.com/blog/simple-authorization-in-ruby-on-rails-apps/ And yet ... I don't get it. I can understand each statement in https://www.varvet.com/blog/simple-authorization-in-ruby-on-rails-apps/ ... but when I get to w

[Rails] help me . have to do a project in less span of time

2017-02-01 Thread kranthi ramireddy
THE ACTUAL PROJECT IMPLEMENTATION: The project implementation will be done with all necessary features included along with security aspects. some of the functionalities : a) Accessing through website. b) Selecting the projects. c) Adding them to wish-list. d) Contac

Re: [Rails] help: url/path for existing resources eg /toolbox

2017-01-04 Thread Greg Navis
I'm not sure what's the precise effect you want to achieve. If you want to have the whole app served from under domain.com/toolbox then you may take a look at Deploy to a subdirectory . If you would like to a

[Rails] help: url/path for existing resources eg /toolbox

2017-01-03 Thread tom
hi, i have a few working resources, eg 'projects' & tasks. now i would like to prefix that with/under a path so that the url looks like that: domain.com/toolbox/projects how can i do that without moving everything into subfolders etc... thx -- You received this message because you are subscr

[Rails] Help with updating Formbuilder-rb Gemspec to support Rails 5.

2017-01-03 Thread David Williams
I've been searching everywhere for a proper drag and drop solution for my rails forms. I came across FormBuilder-rb which is supported by Formbuilder.js. The gem currently doesn't support Rails 5, because it's unmaintained and it also doesn't work with MySQL (Only Postgres) Can you give me a ha

Re: [Rails] HELP on Parsing XLSB File!

2016-12-28 Thread Walter Lee Davis
I would start by looking at the contents of that file with a text editor, see if there is any XML in it. (Note: you may need to convert the file from a Zip package before you can do that, or use a Mac and BBEdit (which can read "into" Zipped formats like ePub and XSLX and show the plain-text con

[Rails] HELP on Parsing XLSB File!

2016-12-27 Thread Rafi A
Hi, I am using ROO gem on my application for parsing excel files. Now I got an scenario to parse xlsb file but that gem throws me an error. Also I have tried with Creek, spreadsheet gems to parse the xlsb file but no luck. Is there a way to do that in Rails then please let me know. Regards, Seen

Re: [Rails] help with sidekiq command during cap deploy - no such file or directory

2016-07-27 Thread tamouse pontiki
On Wed, Jul 27, 2016 at 4:05 PM, tom wrote: > cd /rorapps/foo/staging/foo_com/releases/20160727210019 && /usr/bin/env > sidekiq --index 0 --pidfile > /rorapps/foo/stagingfoo_com/shared/tmp/pids/sidekiq-0.pid --environment > staging --logfile /rorapps/foo/staging/foo_com/shared/log/sidekiq.log > -

[Rails] help with sidekiq command during cap deploy - no such file or directory

2016-07-27 Thread tom
cd /rorapps/foo/staging/foo_com/releases/20160727210019 && /usr/bin/env sidekiq --index 0 --pidfile /rorapps/foo/stagingfoo_com/shared/tmp/pids/sidekiq-0.pid --environment staging --logfile /rorapps/foo/staging/foo_com/shared/log/sidekiq.log --daemon DEBUG [b52ffd5f] /usr/bin/env: DEBUG [b5

Re: [Rails] Help with Joins (Users and Roles)

2016-05-29 Thread Karthikeyan A K
put a table / model like orginiation_user_roles / OrganizationUserRole with columns like organization_id, user_id , and roll . Make the roll as enum type http://edgeapi.rubyonrails.org/classes/ActiveRecord/Enum.html . I hope my answer helps. On Sun, May 29, 2016 at 9:16 PM, John Sanderbeck wrot

[Rails] Help with Joins (Users and Roles)

2016-05-29 Thread John Sanderbeck
What I am trying to do is setup a set of joins that do the following User has a global role such as :global_admin, :building_admin, etc I also have Organizations, Districts, and Buildings I would like a user to be able to be assigned a different role per Organization, District, or Building I ha

[Rails] Help in seeding and logic for my application

2016-05-10 Thread Deepak Sharma
In my application I have to tables 1) Student 2) Alma Mater Department Student table belongs_to :alma_mater_department and Alma Mater Department has_many :students Firstly, I want to predefined some data in seeds.rb for Alma Mater table which I want to look like this + Typ

[Rails] help - building a simple user dashboard

2016-03-24 Thread tom
hi, im trying to find the simplest way of bulding a user dashboard. currentyl using namespace like this: resource :dashboard, to: 'dashboard#index', as: 'dashboard'do resources :vehicles , to: 'vehicles#index' end > controller action is using its own layout file (one yield section), but

Re: [Rails] help: NoMethodError: undefined method `set' for main:Object during cap deploy

2015-12-22 Thread Colin Law
On 22 December 2015 at 19:13, tom wrote: > NoMethodError: undefined method `set' for main:Object > > /apps/app_a/production/releases/20151222191024/config/environments/production.rb:2:in > > > >>>production.rb > > set :sidekiq_role, :app > set :sidekiq_config, "#{current_path}/config/sidekiq.yml"

[Rails] help: NoMethodError: undefined method `set' for main:Object during cap deploy

2015-12-22 Thread tom
NoMethodError: undefined method `set' for main:Object /apps/app_a/production/releases/20151222191024/config/environments/production.rb:2:in >>production.rb set :sidekiq_role, :app set :sidekiq_config, "#{current_path}/config/sidekiq.yml" set :sidekiq_env, 'production' set :deploy_to, "/apps/a

[Rails] Help on getting multiple answers on a polls app

2015-12-07 Thread João Belo
Hello community, I'm working on a polls app and the the user would answer to 3 types of questions: Open answers; Multiple Choice with only one option to select (radio buttons); Multiple Choice with many options to select (checkboxes). i've already done the first and the second type of question,

Re: [Rails] help with final project

2015-11-24 Thread Colin Law
On 24 November 2015 at 05:38, glomb wrote: > Hi, > I am kinda new to ruby but i know how to do the basic stuff but this has > me really stumped. > I want to create a page were a user can create a shipment with a > customizable supply chain. For example: a user makes a new shipment so it > starts

[Rails] help with final project

2015-11-23 Thread glomb
Hi, I am kinda new to ruby but i know how to do the basic stuff but this has me really stumped. I want to create a page were a user can create a shipment with a customizable supply chain. For example: a user makes a new shipment so it starts at the origin and then it goes to point A for packagi

Re: [Rails] Help needed to implement payment gateway

2015-11-09 Thread Hassan Schroeder
On Sun, Nov 8, 2015 at 10:39 PM, Mahesh Mesta wrote > > I am required to integrate a payment gateway into a learning management > application built using ruby on rails. You might find some ideas here: https://www.ruby-toolbox.com/categories/Payments Good luck, -- Hassan Schroeder -

Re: [Rails] Help needed to implement payment gateway

2015-11-08 Thread Przemek Kosakowski
Hi, what kind API are you using ? If you don't choose yet, please look here: http://developer.authorize.net/ below You have example in Ruby https://github.com/AuthorizeNet/sample-code-ruby pon., 9.11.2015 o 08:00 użytkownik Mahesh Mesta napisał: > Hello, > > I am required to integrate a payme

[Rails] Help needed to implement payment gateway

2015-11-08 Thread Mahesh Mesta
Hello, I am required to integrate a payment gateway into a learning management application built using ruby on rails.It should be able to accept money either through net banking or via credit/debit cards as well.However I am very new to this and would appreciate some help.If someone could give

[Rails] [Help] Need help with first_or_create. Never finds existing Record

2015-11-01 Thread James Davis, PhD
Yeah the sql you posted will not work. First, find the record with @project = current_user.projects.where(id: params[:id]).first_or_initialize and then set the attributes as desired. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To u

[Rails] [Help] Need help with first_or_create. Never finds existing Record

2015-11-01 Thread James Davis, PhD
Yeah the sql you posted will not work. First, find the record with @project = current_user.projects.where(id: params[:id]).first_or_initialize and then update as desired. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe

[Rails] [Help] Need help with first_or_create. Never finds existing Record

2015-10-30 Thread Chris Maher
I have a problem with a form that either updates or creates depending on whether the "project" exists already. Im using the def create def create puts params.inspect @project = current_user.projects.where(id: params[:id]).first_or_create(project_params) puts params.inspect if @pro

[Rails] Help regarding adding phone number to user model after omniauth

2015-10-16 Thread Pradeep Yadav
Hi Everyone, I have used devise and omniauth-facebook for my application login .i have a phone number field in my sign-up form of devise and its is mandatory to enter . But when users login via facebook it did not provide user phone number . How can i redirect user to provide phone number befo

Re: [Rails] Help regarding installation of Gems

2015-09-15 Thread Colin Law
On 14 September 2015 at 21:59, Norbert Melzer wrote: > OK, I have taken a closer look into the posted screenshot. It seems to > happen when installing nokogiri, what were the names of the development > headers it depends on? I had missed that, I do not display images by default and had not even n

Re: [Rails] Help regarding installation of Gems

2015-09-14 Thread Norbert Melzer
OK, I have taken a closer look into the posted screenshot. It seems to happen when installing nokogiri, what were the names of the development headers it depends on? Colin Law schrieb am Mo., 14.09.2015, 21:41: > On 14 September 2015 at 18:52, Norbert Melzer wrote: > >> Install gcc, it's obviou

Re: [Rails] Help regarding installation of Gems

2015-09-14 Thread Colin Law
On 14 September 2015 at 18:52, Norbert Melzer wrote: > Install gcc, it's obvious by just looking at which point mkmf cancels... > Probably you will stumble over more missing development packages after > that, but let's make one step after the other. > He said he had already done sudo apt-get ins

Re: [Rails] Help regarding installation of Gems

2015-09-14 Thread Norbert Melzer
Install gcc, it's obvious by just looking at which point mkmf cancels... Probably you will stumble over more missing development packages after that, but let's make one step after the other. Prasanna Moharana schrieb am Mo., 14.09.2015, 12:03: > >

Re: [Rails] Help regarding installation of Gems

2015-09-14 Thread Colin Law
On 14 September 2015 at 11:00, Prasanna Moharana wrote: > > > Hello every body am very new to this group. > i have some issue regarding Rails installati

[Rails] Help regarding installation of Gems

2015-09-14 Thread Prasanna Moharana
Hello every body am very new to this group. i have some issue regarding Rails installation.Though i have installed Ruby,bundler etc i was trying to ins

Re: [Rails] Help with iterating over an array in a histogram

2015-09-12 Thread Rem Zolotykh
Hey Calvin. This line iterates through words array and counts how many times each word is there. Here how it works: Let’s say you have words = ['never', 'say', 'never']. Your frequencies is an empty hash right now: {}. In your line we start to iterate and take the first word never and we use it

Re: [Rails] Help with iterating over an array in a histogram

2015-09-12 Thread Colin Law
On 11 September 2015 at 23:14, Calvin Fung wrote: > Hello there, > > I am currently going through the Ruby course in Codeacademy and we are going > over histograms. There is a particular exercise (5/8 of Data Structures, > Meet Iteration) that is giving me trouble. I do not understand the line of

[Rails] Help with iterating over an array in a histogram

2015-09-11 Thread Calvin Fung
Hello there, I am currently going through the Ruby course in Codeacademy and we are going over histograms. There is a particular exercise (5/8 of Data Structures, Meet Iteration) that is giving me trouble. I do not understand the line of code that is in bold below. I've gone through the exercis

Re: [Rails] Help with dates (week)

2015-09-10 Thread Paramnoor Singh
Hello 1. Get the week number for the date passed and current date. 2. Now check if date passed week number < current date week then it is passed else if both same then it is current week else if greater then it is future week thanks On T

[Rails] Help with dates (week)

2015-09-10 Thread Gm
Hi, I need to know if a week has passed or if it's next week Based on a rang For example: 31/08..06/09 past 07/09..13/09 current 14/09..20/09 future Thanks. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group

Re: [Rails] Help with install and config

2015-09-04 Thread Norbert Melzer
What exactly does it mean when you say "it just wont"? Errormessage? What happens, what do you expect to happen instead? What are you actually doing? Greg NYC schrieb am Fr., 04.09.2015, 7:23: > Hi there! I am new to ruby on rails but have some starting up issues. I am > on a windows 10 updated

Re: [Rails] Help with install and config

2015-09-03 Thread Colin Law
On 3 September 2015 at 22:15, Greg NYC wrote: > Hi there! I am new to ruby on rails but have some starting up issues. I am on > a windows 10 updated system (from 7). I use railsinstaller and install for > ruby 2.1 and everything gets installed alright. No problems yet. I open git > bash and onc

[Rails] Help with install and config

2015-09-03 Thread Greg NYC
Hi there! I am new to ruby on rails but have some starting up issues. I am on a windows 10 updated system (from 7). I use railsinstaller and install for ruby 2.1 and everything gets installed alright. No problems yet. I open git bash and once i start putting in commands I see the text DL depreca

Re: [Rails] [help] - HTTP POST redirect

2015-07-14 Thread Sadaf Noor
It did not redirect because it was not suppose to! You asked it to respond on a send a post request so it did. Now if you want to redirect then you may need to use redirect_to method. 2015-07-14 9:55 GMT+06:00 Vikas Saroha :

Re: [Rails] [help] - HTTP POST redirect

2015-07-14 Thread Hassan Schroeder
On Mon, Jul 13, 2015 at 8:55 PM, Vikas Saroha wrote: > I am looking for some help on making a POST request from the controller to > an external server and follow the redirect. > > I am using - > > response = HTTParty.post(external_uri, post_params) > > but this does not redirect. > > Is there an

[Rails] [help] - HTTP POST redirect

2015-07-13 Thread Vikas Saroha
Hello friends, I am looking for some help on making a POST request from the controller to an external server and follow the redirect. I am using - response = HTTParty.post(external_uri, post_params) but this does not redirect. Is there an easy way this could be done. thanks -- You receive

[Rails] HELP

2015-07-06 Thread StepaAr
I have a couple questions. 1) I have a couple of emails.They are separated between buy comma or space.How to find which one is correct? I was thinking using regular expression like this one : /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i 2)How to put valid email address to database ? 3)If

Re: [Rails] Help getting started

2015-06-30 Thread Cody Skidmore
Colin is right about switching to Mac or Linux. If you really want to use Ruby & Rails, setup up a VM in VirtualBox. I use Linux Mint which is great for traditional Windows users. Be fearless and jump right in. Google Search is your friend. -- You received this message because you are subscrib

Re: [Rails] Help getting started

2015-06-29 Thread Colin Law
On 29 June 2015 at 02:35, Katrina Swales wrote: > Except even the one you linked pointed out, they WERE using the appropriate > version, no one answered there either. Having the same problem myself Don't understand your comment, the link I posted (http://stackoverflow.com/questions/15537191/why-

Re: [Rails] Help getting started

2015-06-28 Thread Katrina Swales
Except even the one you linked pointed out, they WERE using the appropriate version, no one answered there either. Having the same problem myself On Thursday, 23 April 2015 08:32:37 UTC+1, Colin Law wrote: > > On 21 April 2015 at 03:39, TC R. > > wrote: > > Running windows 8. > > ... > > c:

[Rails] Help with kaminari

2015-06-08 Thread James Davis, PhD
Try implementing the pagination in an ajax-ish manner. This video is a little old but still relevant http://railscasts.com/episodes/240-search-sort-paginate-with-ajax I use AngularJS for my applications, which accomplishes the single page application feel, but becoming proficient at it is not

Re: [Rails] Help with kaminari

2015-06-05 Thread Colin Law
On 5 June 2015 at 08:42, Santiago Norman wrote: > I am paginating a question in my view and it has a countdown timer. The > timer is applied to all the questions means that if I give a 60 mins, I must > finish all the questions within the given time. How can I maintain the > timers time even if I

[Rails] Help with kaminari

2015-06-05 Thread Santiago Norman
I am paginating a question in my view and it has a countdown timer. The timer is applied to all the questions means that if I give a 60 mins, I must finish all the questions within the given time. How can I maintain the timers time even if I click the next link? -- You received this message b

[Rails] Help with nokogiri

2015-06-03 Thread Gm
I'm trying to work with nokogiri but I have some problems I need to iterate a string that has several tags with a base64 image and change it for a url example: "test bla bla bla " Change to: "test bla bla bla " How can I select these img tags, change the src content and return the same str

Re: [Rails] Help with validation

2015-04-25 Thread Gm
Thanks. On Saturday, April 25, 2015 at 1:18:51 PM UTC-3, matt wrote: > > I don’t think you want your model validating another models attributes > like this but to answer the question you could put in a return statement. > return errors.add(…) > > > On Apr 25, 2015, at 8:47 AM, Gm > wrote: > > Hi

Re: [Rails] Help with validation

2015-04-25 Thread BuyzLots
I don’t think you want your model validating another models attributes like this but to answer the question you could put in a return statement. return errors.add(…) > On Apr 25, 2015, at 8:47 AM, Gm wrote: > > Hi, > > I'm trying to validate an array attribute "accepts_nested_attributes_for"

[Rails] Help with validation

2015-04-25 Thread Gm
Hi, I'm trying to validate an array attribute "accepts_nested_attributes_for". I've created a method like this: validate :validate_nested_attributes def validate_nested_attributes items.each do |item| errors.add("item_#{item.number}_#{self.id}", "error on #{item.number}") if item.v

Re: [Rails] Help getting started

2015-04-23 Thread Colin Law
On 21 April 2015 at 03:39, TC R. wrote: > Running windows 8. > ... > c:/RailsInstaller/Ruby22/include/ruby-2.2.0/ruby/ruby.h:111:14: error: > size of array 'ruby_check_sizeof_voidp' is negative I always recommend not using Windows for Rails, use Mac or Linux (eg Ubuntu) instead. However since no

[Rails] Help me to find a way to share controller and view for a polymorfic association

2015-04-21 Thread Roberto Pezzali
Hello, I'm trying to complete my app but I'm blocked in front of a relation. I have 3 models: Video, Gallery and Content. Every model is sharable and I'm using a polymorphic relation, so I create a content_share model. I want to manage my association with the content_share controller and with a s

[Rails] Help getting started

2015-04-20 Thread TC R.
Running windows 8. Uninstalled older version of rails and installed the most recent version using railsinstaller. Also installed DevKit. When I do a bundle install, however, I get the following: c:\RubymineProjects\untitled>bundle install Fetching gem metadata from https://rubygems.org/..

Re: [Rails] Help with habtm

2015-03-24 Thread Colin Law
On 24 March 2015 at 18:50, Gm wrote: > Hi, > > I'm using habtm to create a relationship between two models: > > class Question < ActiveRecord::Base > has_and_belongs_to_many :exams > end > > class Exam < ActiveRecord::Base > has_and_belongs_to_many :questions > end > > At some point I'm doing

[Rails] Help with habtm

2015-03-24 Thread Gm
Hi, I'm using habtm to create a relationship between two models: class Question < ActiveRecord::Base has_and_belongs_to_many :exams end class Exam < ActiveRecord::Base has_and_belongs_to_many :questions end At some point I'm doing this: class Exam < ActiveRecord::Base has_and_belongs_to

Re: [Rails] Help with this error

2015-03-24 Thread Colin Law
On 24 March 2015 at 09:44, Rails_beginner wrote: > I am getting undefined method `delayed_backend_active_record_job_path' > I want to redirect the user to _list_row.html.haml page when they click on a > job_id link but somehow I am getting the above error Which line of your code is generating the

[Rails] Help with this error

2015-03-24 Thread Rails_beginner
I am getting undefined method `delayed_backend_active_record_job_path' I want to redirect the user to _list_row.html.haml page when they click on a job_id link but somehow I am getting the above error delayed_jobs_controller.rb class Admin::DelayedJobsController < Admin::BaseController

[Rails] Help! Haml::SyntaxError in Posts#show

2015-03-22 Thread Elysee Montissol
Ok, so I'm challenging myself to actually learn ruby/rails, I'm currently doing the 12 on 12 challenge by mackenzie childs, i'm doing the Muze app. I'm trying to add a comment section to the post section of the site but when i try to pull up a post, i'm getting: Haml::SyntaxError in Posts#show Ex

Re: [Rails] help! what does deep_symbolize_keys mean?

2015-02-17 Thread Colin Law
On 17 February 2015 at 12:52, Jensen Vang wrote: > help! what does this means? undefined method `deep_symbolize_keys' for > "":String It probably means you have done something like passing a string parameter when a hash is expected. Colin -- You received this message because you are subscribed

Re: [Rails] help! what does deep_symbolize_keys mean?

2015-02-17 Thread Anuj Dutta
Hi, It means the method 'deep_symbolize_keys' isn't defined for an instance of a String. 'deep_symbolize_keys' is used for hashes. Google to use use cases. Hope it helps. Anuj On 17 February 2015 at 12:52, Jensen Vang wrote: > help! what does this means? undefined method `deep_symbolize_keys'

[Rails] help! what does deep_symbolize_keys mean?

2015-02-17 Thread Jensen Vang
help! what does this means? undefined method `deep_symbolize_keys' for "":String -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubsc

  1   2   3   4   5   6   7   8   9   >