Comments for Learn with Daniel A learner diary Mon, 22 Jul 2019 02:11:30 +0000 hourly 1 https://wordpress.org/?v=5.2.3 Comment on CityState Gem: Cities, states and countries in Ruby/Rails by Reynold Dmello /2015/02/citystate-list-of-countries-cities-and-states-ruby/%23comment-38 Wed, 06 Dec 2017 21:29:00 +0000 http://www.learnwithdaniel.com/?p=75#comment-38 Hi thanks for the gem and tutorial, one doubt though after getting the list of states I wanted to store the selected value in database, I tried several ways but I failed. Is there something I am missing:

<option value="”>

]]>
Comment on Create a Filesystem with Ruby and FUSE by Lewis Cowles /2017/04/file-systems-ruby-fuse/%23comment-37 Wed, 13 Sep 2017 12:21:00 +0000 http://www.learnwithdaniel.com/?p=255#comment-37 I can’t remember what command I wanted to have as a file-system object on read, but I may well use something like this to facilitate.

]]>
Comment on Rails Server with Apache + Puma (via reverse proxy) by Iván Castellanos /2015/01/apache-puma-via-reverse-proxy/%23comment-36 Sat, 09 Sep 2017 21:50:00 +0000 http://www.learnwithdaniel.com/?p=49#comment-36 In Windows this creates an error “ProxyPassReverse / http://127.0.0.1:9292/ # don’t forget the trailing slashes at end!!!”

Delete the comment to fix the error stopping Apache from starting.

]]>
Comment on Create a Filesystem with Ruby and FUSE by ylluminate /2017/04/file-systems-ruby-fuse/%23comment-35 Sun, 30 Jul 2017 02:38:00 +0000 http://www.learnwithdaniel.com/?p=255#comment-35 Great tutorial! Really have been wanting to dig into Fuse dev. Having some problems on macOS with missing Fuse dev libs. Any ideas on getting full Fuse dev libs in place on macOS?

I’ve gone ahead and put a request for some input here: https://github.com/osxfuse/osxfuse/issues/400

]]>
Comment on CityState Gem: Cities, states and countries in Ruby/Rails by Juan Trejo /2015/02/citystate-list-of-countries-cities-and-states-ruby/%23comment-24 Wed, 02 Nov 2016 21:53:00 +0000 http://www.learnwithdaniel.com/?p=75#comment-24 you only need put something like this:
class Model < ActiveRecord::Base
##your attributes and associations

## your methods
## …………..

def self.get_countries
CS.get
end

def self.get_states(country_code)
CS.get country_code.to_sym
end

def self.get_cities(state_code)
CS.get :us state_code.to_sym
end
end

]]>
Comment on Rails and AngularJS: Authentication with Devise by Nkansah Rexford /2015/10/rails-angular-authentication/%23comment-34 Tue, 11 Oct 2016 22:24:00 +0000 http://www.learnwithdaniel.com/?p=163#comment-34 Left me in the middle of nowhere. Sheesh, wasn’t that helpful.

]]>
Comment on Rails and AngularJS: Authentication with Devise by Nerio Navea /2015/10/rails-angular-authentication/%23comment-33 Fri, 25 Mar 2016 02:19:00 +0000 http://www.learnwithdaniel.com/?p=163#comment-33 It works, thanks!

]]>
Comment on Rails and AngularJS: Authentication with Devise by Daniel Loureiro /2015/10/rails-angular-authentication/%23comment-32 Fri, 25 Mar 2016 01:40:00 +0000 http://www.learnwithdaniel.com/?p=163#comment-32 I just realized that my tutorial is incomplete. It lacks the code that binds Angular with Rails API :P

Instead of baseUrl, why don’t you do something like this:

var api_url = 'http://localhost:3000/';

AuthProvider.loginPath(api_url + 'users/sign_in.json');
AuthProvider.loginMethod('POST');
AuthProvider.resourceName('user');

AuthProvider.registerPath(api_url + 'users.json');
AuthProvider.registerMethod('POST');
AuthProvider.resourceName('user');

AuthProvider.logoutPath(api_url + 'users/sign_out.json');
AuthProvider.logoutMethod('DELETE');

]]>
Comment on Rails and AngularJS: Authentication with Devise by Nerio Navea /2015/10/rails-angular-authentication/%23comment-31 Fri, 25 Mar 2016 01:13:00 +0000 http://www.learnwithdaniel.com/?p=163#comment-31 i fix the error but still returns me this:

Error: [$injector:modulerr] Failed to instantiate module clientApp due to:
AuthProvider.baseUrl is not a function
@http://localhost:4567/index.html:13:5

I was searching on the ‘/lib/devise.js’ file and in AuthProvider there is not a baseUrl method defined. do i have to require another file on this?, because there is another file in ‘/src’ folder with have a file called ‘Auth.js’ and this file have a definition of ‘baseUrl’ method in AuthProvider. sorry but i’m confussed with this

]]>
Comment on Rails and AngularJS: Authentication with Devise by Daniel Loureiro /2015/10/rails-angular-authentication/%23comment-30 Thu, 24 Mar 2016 22:16:00 +0000 http://www.learnwithdaniel.com/?p=163#comment-30 There’s a typo in your code:
“‘http://localhost:3000”

Should it be (look the orphan single quote at second character):
“http://localhost:3000”

]]>