If your field is a datetime field instead of a date field (the example in this tutorial :published_on is a date field), then you can adjust your controller as per this answer on StackOverflow
Has anyone figured out the issue with why chrome won't work locally with the JDK but Safari will?
ruby
OmniAuth::Strategies::Facebook::NoAuthorizationCodeError (must pass either a
`code` parameter or a signed request (via `signed_request` parameter or a
`fbsr_XXX` cookie)):
there's a message on chrome with "Unsafe Javascrtipt attempt to access frame with URL....... but there is no message like that in Safari.
I do have the FB.init setup properly
FB.init({
appId : 'myappid', // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
You can accomplish this on the server side by building the nested object in your view. Use the "build_(association name)" method, which is provided by Active Record.
For anyone not using rails, there is one tricky bit. here:
ruby
RSpec.configure do |c|
c.treat_symbols_as_metadata_keys_with_true_values = true
c.around(:each, :vcr) do |example|
name = example.metadata[:full_description].split(/\s+/, 2).join("/").underscore.gsub(/[^\w\/]+/, "_")
options = example.metadata.slice(:record, :match_requests_on).except(:example_group)
VCR.use_cassette(name, options) { example.call }
endend
The underscore method is a rails helper, but is unnecessary here because gsub(/[^\w\/]+/, "_") already takes care of any non-word character that's not a slash.
Storing this data means your application must meet certain security requirements. In the United States, this also means that you would most likely be legally liable if the information was ever stolen from you.
To anyone proposing solutions for improving access controls, (or doing updated rairscasts)
please include a simple DRY way for seeds.rb and test fixtures/factories to operate with minimal interference. For example, my customer requires several read-only lookup tables in the database . Even though they are read-only in steady state, i'm forced to list each column name with attr_accessible in each model, just to have a simple seeds.rb file. Would be helpful to have a way to turn off all the controls in special cases like that, without having to list each attribute name for each model.
How can I use queue_classic to send emails? I can pretty much make queue_classic call any method and Queue it successfully, but when it comes the time to call an ActionMailer method or a class method that wraps an ActionMailer call, it simply Doesn't work!
is there an additional configuration needed?
PS. I can see the method being queued in the queue_classic_jobs table and then being removed, but it basically does nothing(does not send the e-mail) :(
Funny. We switched from MySQL to MongoDB and Monogid about a year ago for the same basic reason they moved the other way. :)
We had SQL migrations and "strongly typed schema" as a major source of friction in a system that's quickly evolving and iterating. I miss joins but there is really only a single query in our system where it is a significant problem.
I think creating a file like _globals.css.scss and importing it into your SASS files is more flexible than just importing them all manually in application.css.scss.
I recommend Mongify if you want to create a branch of your app and move your data over from MySQL to MongoDB (and Mongoid). It saved my life when I migrated in that direction last year.
Is it possible to get info inside the uploaded pdf file using this gem? example I uploaded my resume and I want get my name, contact info, etc. from that pdf.
Thanks Ryan. I am getting "500 Internal Server Error" error after installing nginx. Not sure what I am missing, even though I am following exact steps mentioned in the web cast.
I've installed MiniProfiler with no problems, however I'm unable to find the configuration to allow more then 10 traces in the top left corder. The actual useful requests are getting "swallowed" by later smaller requests... (I can't precompile assets in order to reduce number of requests yet as I am on 3.0.x). Is such config option available?
Thank you so much for this episode!
I'm also happy with another great jQuery plugin named fullcalendar.
It has Lots of support such as events from JSON and is updated frequently, theck it out! : )
I would like to implement your "first case" example (with facebook) but I have been running into some issues with how to extend Ryan's method. Any help in how to setup the correct controller actions to essentially let someone merge their facebook uid into an existing user record?
Also of possible use: I recently had to add a monthpicker to a client's Rails project, allowing the user to select a month and a year, but no day. There's a useful add-on for this functionality here: https://github.com/thebrowser/jquery.ui.monthpicker
I enjoyed this episode, though the second migration to populate counts for previous records didn't seem to go over so well when I ran it on Heroku. I ended up rolling back the second migration.
When you step through migration steps, your model class might not correspond to the fields in the database for previous migrations. Let's say at a later point you change the model, and this older migration needs to run, it might fail because you've added validation logic or subsequently altered/removed a column that it's trying to migrate.
There is an extension to jQuery's datepicker called datetimepicker I believe that adds hours and minutes to the selector. It does use a slider, but works well. Think this is it http://trentrichardson.com/examples/timepicker/
If you are using twitter bootstrap in your app you might find this calendar very handy: http://www.eyecon.ro/bootstrap-datepicker/ It integrates nicely with bootstrap design and seems to have the same functionality as the one from jquery ui.
If your field is a datetime field instead of a date field (the example in this tutorial
:published_on
is a date field), then you can adjust your controller as per this answer on StackOverflowHas anyone figured out the issue with why chrome won't work locally with the JDK but Safari will?
there's a message on chrome with "Unsafe Javascrtipt attempt to access frame with URL....... but there is no message like that in Safari.
I do have the FB.init setup properly
I find out a easy solution. Just edit your routes.rb file like this:
But there is another problem. I got 2 different display styles (grid and list).
When I try something like this:
I get the "pretty url" plus "?display=grid" =/
You can accomplish this on the server side by building the nested object in your view. Use the "build_(association name)" method, which is provided by Active Record.
Inside the
_action_fields.html.erb
partial:Now the
fields_for :action
block will execute and render theaction_fields
partial.Naturally you would want to use this in the sub-nested partials as well.
The repo has moved here: https://github.com/vmg/redcarpet
For anyone not using rails, there is one tricky bit. here:
The
underscore
method is a rails helper, but is unnecessary here becausegsub(/[^\w\/]+/, "_")
already takes care of any non-word character that's not a slash.Hi,
does anyone have a good solution to modify the will_paginate paging urls?
old:
.../products?page=2
new:
.../products/page/2/
I am used http://www.eyecon.ro/bootstrap-datepicker/ it is verry usable
Where do I edit/find etc/paths?
Storing this data means your application must meet certain security requirements. In the United States, this also means that you would most likely be legally liable if the information was ever stolen from you.
wow awesome. how was that conference?
how do you like it?
With the default routing:
resources :products
you'll get routes for #new and #edit, which aren't used in a pure JSON interface. Is there a reason for NOT doing
?
To anyone proposing solutions for improving access controls, (or doing updated rairscasts)
please include a simple DRY way for seeds.rb and test fixtures/factories to operate with minimal interference. For example, my customer requires several read-only lookup tables in the database . Even though they are read-only in steady state, i'm forced to list each column name with attr_accessible in each model, just to have a simple seeds.rb file. Would be helpful to have a way to turn off all the controls in special cases like that, without having to list each attribute name for each model.
Very nice video :)
But I must convert ~ 1.300.000 records on my database.
Know you faster metod that this ?
Thanks for reply.
How can I use queue_classic to send emails? I can pretty much make queue_classic call any method and Queue it successfully, but when it comes the time to call an ActionMailer method or a class method that wraps an ActionMailer call, it simply Doesn't work!
is there an additional configuration needed?
PS. I can see the method being queued in the queue_classic_jobs table and then being removed, but it basically does nothing(does not send the e-mail) :(
The github repository for redcarpet has gone away, does anyone know what's happening with it?
https://github.com/tanoku/redcarpet
Funny. We switched from MySQL to MongoDB and Monogid about a year ago for the same basic reason they moved the other way. :)
We had SQL migrations and "strongly typed schema" as a major source of friction in a system that's quickly evolving and iterating. I miss joins but there is really only a single query in our system where it is a significant problem.
I think creating a file like
_globals.css.scss
and importing it into your SASS files is more flexible than just importing them all manually inapplication.css.scss
.I recommend Mongify if you want to create a branch of your app and move your data over from MySQL to MongoDB (and Mongoid). It saved my life when I migrated in that direction last year.
https://github.com/anlek/mongify
What is better Squeel or sequel?
Is it possible to get info inside the uploaded pdf file using this gem? example I uploaded my resume and I want get my name, contact info, etc. from that pdf.
Jakub have my babies!
Thanks Ryan. I am getting "500 Internal Server Error" error after installing nginx. Not sure what I am missing, even though I am following exact steps mentioned in the web cast.
I find this to be the most effective way for entering date and time. EVER
http://keith-wood.name/datetimeEntry.html
I tried these other solutions as well but none is as natural and efficient when you have to pick 100+ of dates and times:
I call this, Normalized units calendar
http://www.ama3.com/anytime/#AnyTime.picker.placement
iPhone Style
http://demo.mobiscroll.com/#demo=datetime&theme=default&display=modal&mode=mixed
Windows System Tray Like
http://www.eyecon.ro/datepicker/
an O.K. one
http://stefangabos.ro/jquery/zebra-datepicker/
TimePicker
https://github.com/fgelinas/timepicker
https://github.com/ChiperSoft/Kalendae
Hope these help
Kalendae is a great alternative to including jQuery UI for just a date picker. I wrote a gem to provide as an asset for Rails 3.1+
https://github.com/sdball/kalendae_assets
http://rakeroutes.com/blog/add-kalendae-to-your-rails-app-with-kalendae-assets/
Removing the pg gem from the gem file resolved the issue. The MySQL gem may also cause this to happen.
this gem may me useful for twitter bootstrap users who need a time as well http://jdewit.github.com/bootstrap-timepicker/
When i try to open the login form I get this error
Showing /app/views/users/new.html.erb where line #16 raised:
no implicit conversion from nil to integer
Anyone knows how to fix this?
I am using the fullcalendar to generate calendar too.
I've installed MiniProfiler with no problems, however I'm unable to find the configuration to allow more then 10 traces in the top left corder. The actual useful requests are getting "swallowed" by later smaller requests... (I can't precompile assets in order to reduce number of requests yet as I am on 3.0.x). Is such config option available?
Ta for that!
Thank you so much for this episode!
I'm also happy with another great jQuery plugin named fullcalendar.
It has Lots of support such as events from JSON and is updated frequently, theck it out! : )
What would be sweeter than cancan getting down with strong_parameters under the covers?
I would like to implement your "first case" example (with facebook) but I have been running into some issues with how to extend Ryan's method. Any help in how to setup the correct controller actions to essentially let someone merge their facebook uid into an existing user record?
Thanks in advance
-Dan
Also of possible use: I recently had to add a monthpicker to a client's Rails project, allowing the user to select a month and a year, but no day. There's a useful add-on for this functionality here: https://github.com/thebrowser/jquery.ui.monthpicker
I enjoyed this episode, though the second migration to populate counts for previous records didn't seem to go over so well when I ran it on Heroku. I ended up rolling back the second migration.
How do you go about localizing the predicate fields?
Something is wrong with your configuration then. I downloaded the source and ran the "blog_after." It works perfectly.
This helped me to build rack-markdown.
FYI if you're using Rails 3 you need to change the line:
to:
Makes sense, thanks Andrew.
This was very helpful for me. Thanks for sharing.
Does this gem do
query_trace
style logging? What's the current fancy option for that?When you step through migration steps, your model class might not correspond to the fields in the database for previous migrations. Let's say at a later point you change the model, and this older migration needs to run, it might fail because you've added validation logic or subsequently altered/removed a column that it's trying to migrate.
There is an extension to jQuery's datepicker called datetimepicker I believe that adds hours and minutes to the selector. It does use a slider, but works well. Think this is it http://trentrichardson.com/examples/timepicker/
Struct.new gives me a superclass mismatch
I fixed this by removing the < Struct.new and adding
attr_accessor :view, :date, :callback
If you are using twitter bootstrap in your app you might find this calendar very handy: http://www.eyecon.ro/bootstrap-datepicker/ It integrates nicely with bootstrap design and seems to have the same functionality as the one from jquery ui.
I agree. I plan to use this on my app. I'll probably check the size and if it's more than 5 items for that day will have a
<%= link_to "#{@model.size} more ...", list_of_models_path(@model) %>
Awesome! I have all of the full screen JS calendars I've seen. This is nice and clean and can easily be customized.
Great job.