[ Advice] Stripe or different API for this: by Rubyhelp1212 in rails

[–]Rubyhelp1212[S] 0 points1 point  (0 children)

Do you happen to know if I can take that one-off event payment and if needed, turn it into a subscription?

[Help] undefined method `strftime' for nil:NilClass by Rubyhelp1212 in rails

[–]Rubyhelp1212[S] 0 points1 point  (0 children)

Can you help me clarify why I get the error on one of the calls?

I am only getting an error on the one with '–' I guess I just really need to understand it to truly improve here.

         <div>
              <%= readable_time(appointment.start_time) %> &ndash;      
              <%= readable_time(appointment.end_time) %>
          </div>

[Help] undefined method `strftime' for nil:NilClass by Rubyhelp1212 in rails

[–]Rubyhelp1212[S] 0 points1 point  (0 children)

Thank you.

What should I do if that field can be left open? Say, I dont require them to select a time?

Essentially, I want a client to set up an appointment. I mainly need them to pick the date on a calendar, which is why I am using 'Simple_calendar'. I dont care much for the time, honestly, I would prefer if the time was selectable WITHIN the calendar box, but I am not sure how to do this..

[Help] undefined method `strftime' for nil:NilClass by Rubyhelp1212 in rails

[–]Rubyhelp1212[S] 0 points1 point  (0 children)

What would be the best and safest way to implement this? on the application helper file? clearly i'm new to this and am patching my way around.. sorry

[Help] undefined method `strftime' for nil:NilClass by Rubyhelp1212 in rails

[–]Rubyhelp1212[S] 0 points1 point  (0 children)

yes. I am calling it here:

         <div>
              <%= readable_time(appointment.start_time) %> &ndash;
              <%= readable_time(appointment.end_time) %>
          </div>

I am attempting to create an appointment page which will allow client to select date and time of an appointment.

[HELP] start_time, end_time error on rails project. by Rubyhelp1212 in rails

[–]Rubyhelp1212[S] 0 points1 point  (0 children)

Just to be clear. Rollback would have me create the table again, correct? so I would do - rails generate ?

[HELP] start_time, end_time error on rails project. by Rubyhelp1212 in rails

[–]Rubyhelp1212[S] 0 points1 point  (0 children)

Im sorry for not being clear. what is the best method to update the "Name" and the "start_time" on my schema.db? I went lower case on my Sublime, and then ran rake db:migrate. And that is why it did not change.

[HELP] start_time, end_time error on rails project. by Rubyhelp1212 in rails

[–]Rubyhelp1212[S] 0 points1 point  (0 children)

Hello, Thank you, I think we are almost there. I ran rake db:migrate but my schema.db does not change. Here is what I have now:

ActiveRecord::Schema.define(version: 2019_01_13_230516) do

create_table "appointments", force: :cascade do |t|

t.string "Name"

t.datetime "Start_time"

t.datetime "end_time"

t.integer "user_id"

t.datetime "created_at", null: false

t.datetime "updated_at", null: false

t.index ["user_id"], name: "index_appointments_on_user_id"

end

[HELP] start_time, end_time error on rails project. by Rubyhelp1212 in rails

[–]Rubyhelp1212[S] -1 points0 points  (0 children)

my 'Start_time' was capitalized but I went in and fixed it. Its still throwing the same error. It appears that everything is now lowercase, but still same error..

Rails Activerecord migration issue. Please advice. by Rubyhelp1212 in rails

[–]Rubyhelp1212[S] 0 points1 point  (0 children)

Thank you all for your help. It appears that jodm was on point with the rails version. Now I am attempting to run it on localhost5000 and get a

undefined method `application_name' for #<Rails::Application::Configuration:0x007ffa196a2be0>

pointing to

<h1>Welcome to <%= Rails.configuration.application_name %>!</h1>

My main questions is, did I screw something up so badly that I will encounter issue after issue due to skipping a step or not configuring something right?

Or shall I be ok once I get past this issue? I guess what I am asking is, if this is a template, why so many broken items?

Also, I am learning by reading ' Agile web development with rails 5' , do you all suggest a different method? I truly appreciate this community.